Remix.run Logo
breadwinner 5 days ago

> Nobody is completely immune to trends and fads, but the SQLite developers work hard to avoid being sucked into the latest programming fashion.

So good to see this. I have seen so many developers use the latest C# features heavily, to avoid looking weak.

Narann 5 days ago | parent | next [-]

The second sentence is also very good to see:

> Our aim is to produce timeless code that will be readable, understandable, and maintainable by programmers who have not yet been born.

hangonhn 5 days ago | parent | prev | next [-]

What do you mean by avoid looking weak? Like engineers in that community look down on not using the latest features?

general1726 5 days ago | parent | next [-]

There is a FOMO especially around younger developers who wants to use latest, newest and upgrade all frameworks the moment they pop out on Microsoft website.

Older developers (like me) have opposite problem and I have been fighting for months to not upgrade .NET4.8 to .NET8 due to compatibility with our current deployment chains etc. In the end I had to admit that using .NET8 for everything is going to work too and is going to give us access to better tools and new tech either through some teething problems.

riku_iki 4 days ago | parent | next [-]

It could be because this is the easier way to build up resume and be competitive on the market.

neonsunset 4 days ago | parent | prev [-]

[dead]

jayd16 5 days ago | parent | prev | next [-]

I think the parent is mostly sour grapes.

There is no such community push but like anywhere else, you'll see folks get excited about new toys and then try to force them in to try them. It's not any worse for C# than anything else.

breadwinner 5 days ago | parent | prev [-]

> Like engineers in that community look down on not using the latest features?

Yes. Engineers use the latest features heavily to demonstrate that their skills are current.

One of the worst such features is "var". Some tools even flag your code for not using var when you could. Inappropriate use of "var" makes code harder to read (and even MS documentation says this) and makes code slightly less reliable too.

enlightens 4 days ago | parent [-]

Ok but var has been around since C# 3.0 in 2007. Love it or hate it, using that keyword in 2025 signals nothing about how current your skills are.

https://en.wikipedia.org/wiki/C_Sharp_3.0#Local_variable_typ...

breadwinner 4 days ago | parent | next [-]

You are right about this not being a new feature. But if you don't use it, it seems like you haven't updated your skills in a while.

Besides making the code harder to read, "var" also makes your code less reliable as seen in this example: https://circles.page/567f44465c28b00bf8ed6cf9/Csharp-Type-In...

recursive 4 days ago | parent [-]

SomeMethod().Fire(); has the same "problem". var e = new Employee(); does not.

The problem you see is independent from var.

breadwinner 4 days ago | parent [-]

You are right, SomeMethod().Fire() has the problem too. But typically you write

   Employee e = SomeMethod();
   e.Fire();
This does NOT have the same problem as var. When you use var you reduce the opportunities for the compiler to catch your bug. So the best practice is to explicitly state the type when possible. It makes the code more readable too.

What's more, Microsoft recommends using implicit typing for local variables only when the type of the variable is obvious from the right side of the assignment. See: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...

But that's not what the community is doing, and some tools (JetBrains Rider) recommend using var whenever possible.

recursive 4 days ago | parent [-]

Microsoft recommendation is reasonable. I don't think var should be used as much Rider recommends. But var is perfectly fine in itself. The problem you illustrated occurs independently from var. You assert that one "typically" writes code a certain way but I've seen plenty of both. Further, sometimes you need var. Sometimes the target type can't be spelled like with anonymous types.

breadwinner 4 days ago | parent [-]

You are contradicting yourself... var is perfectly fine... but it shouldn't be used as much...

recursive 3 days ago | parent [-]

Sorry for being unclear. Var is perfectly fine in many cases. Sometimes there are better tools. Screwdrivers are fine tools but they are not appropriate for driving nails.

enlightens 4 days ago | parent | prev [-]

from your sibling comment: > "var" also makes your code less reliable as seen in this example

I disagree with this too, I think your example is a classic case of preprocessor directives making it difficult to know what your code is doing because the build system is going to conditionally change your code. Var or not, you can't even know what's being compiled just by looking at the file, and that's a larger problem than the use of var

https://learn.microsoft.com/en-us/dotnet/csharp/language-ref...

breadwinner 4 days ago | parent [-]

Use of preprocessor in the example is incidental. The problem with var is that you're not completely stating your intent, leaving it to the compiler to infer your intent. This can lead to trouble in some cases.

I have seen code that sorts numbers as strings, because nowhere in the code was the intent stated that the array is supposed to hold numbers. As a result, if the programmer forgot to convert strings to integers at input time, the bug is never caught.

See: https://circles.page/567f44465c28b00bf8ed6cf9/Csharp-type-in...

8bitbeep 5 days ago | parent | prev | next [-]

Funny. I don’t need to work hard for that at all. It comes naturally to me. It obviously has its pros and cons, but to me, a shiny new tech has to prove itself first in order to deserve my attention.

There are, occasionally, the “wow, I got to have that” moments and those are great, but rare.

nurettin 4 days ago | parent | prev | next [-]

I stopped using C# 10+ years ago, but I remember wanting to update the framework and use the latest thing (linq to objects) because it made code a lot more concise.

beagle3 4 days ago | parent [-]

I have an observation about this: everybody wants a small upgrade that makes it easy for them to make their code a little more concise;

But somehow, almost no one wants a language that is already super-terse in the first place (like Lisp or APL- family).

And yes, that requires a paradigm change to make the most of it - but so does e.g. LINQ.

It’s about the journey, not about the destination.

nurettin 4 days ago | parent [-]

I can see someone defending Ruby as concise (having the ability to chain different transformations) and simple to write in (low verbosity). Lisp? Define a class and do some map/filter/reduce. Lisp is verbose. Sometimes even worse than Java21 these days.

Just put the equivalent code side by side and look. You would be surprised at how much verbosity you choose to ignore.

4 days ago | parent | prev [-]
[deleted]