← Back to context

Comment by LunicLynx

9 hours ago

You aren’t giving enough credit to the careful evaluation of how this adaption is happening.

So far everything that was added to C# very much reduces the amount of dead boilerplate code other languages struggle with.

Really give it an honest try before you judge it based on the summation of headlines.

> reduces the amount of dead boilerplate code other languages struggle with.

given that most of the thinks added seem more inspired by other languages then "moved over" from F# the "other languages struggle with" part makes not that much sense

like some languages which had been ahead of C# and made union type a "expected general purpose" feature of "some kind":

- Java: sealed interfaces (on high level the same this C# features, details differ)

- Rust: it's enum type (but better at reducing boilerplate due to not needing to define a separate type per variant, but being able to do so if you need to)

- TypeScript: untagged sum types + literal types => tagged sum types

- C++: std::variant (let's ignore raw union usage, that is more a landmine then a feature)

either way, grate to have it, it's really convenient to represent a `TYPE is either of TYPES` relationship. Which are conceptually very common and working around them without proper type system support is annoying (but very viable).

I also would say that while it is often associated with functional programing it has become generally expected even if you language isn't functional. Comparable to e.g. having some limited closure support.

In isolation, yes, I agree with you. But in the context of the cornucopia of other "carefully evaluated" features mixed into the melting pot, C# is a nightmare of language identities - a jack of all trades, master of none, choose your dialect language. No thanks.

  • If it’s not for you I guess that is ok. But from your comment I would also deduct that you never professionally used it. After so many different languages it’s the only one I always comeback to.

    The only things that I wish for are: rusts borrow-checker and memory management. And the AOT story would be more natural.

    Besides that, for me, it is the general purpose language.

    • General purpose != multiple dialects, that is the trouble with languages like this - C# is a tower of babel.

  • > C# is a nightmare of language identities - a jack of all trades, master of none, choose your dialect language.

    I honestly have no idea where you would get this idea from. C# is a pretty opinionated language and it's worst faults all come from version 1.0 where it was mostly a clone of Java. They've been very carefully undoing that for years now.

    It's a far more comfortable and strict language now than before.

    • I can see where he's coming from. For example, `dynamic` was initially introduced to support COM interop when Office add-in functionality was introduced. Should I use it in my web API? I can, but I probably shouldn't.

      `.ConfigureAwait(bool)` is another where it is relevant, but only in some contexts.

      This is precisely because the language itself operates in many runtime scenarios.

      3 replies →

  • >a jack of all trades

    Yes, C# is a jack of all trades and can be used at many things. Web, desktop mobile, microservices, CLI, embedded software, games. Probably is not fitted for writing operating systems kernels due to the GC but most areas can be tackled with C#.