logoalt Hacker News

dude250711 • today at 10:43 AM • 5 replies • view on HN

If all possible metrics are considered, C# might be the best language ever created.


Replies

humanfromearth9 • today at 12:53 PM

Not by the measure of how much accidental coupling its constructs impose upon its code: https://yannickloth.github.io/independentvariation/software/...

➕ show 2 replies
CharlieDigital • today at 10:51 AM

I really like TS as well, but what kills it for me is the fragmented tooling landscape and tendency to bad practices by undisciplined devs (lack of explicit types making things hard to track down). I also hate writing intermediate schemas (zod, valibot, etc.) to get runtime type safety (love Typia for this). Debugger is flaky based on setup as well. I like writing TS solo, but hate doing it in a team environment.

gf000 • today at 11:41 AM

That's probably the very reason it's arguably not the best language ever created. It has way too large surface area, getting close to C++ levels.

Sure, it's a valid language design, but it's also a negative in "understandability of each line of code", and thus maintainability, and even stuff like tooling, verification.

simonask • today at 10:56 AM

C# is an odd one. It's surprisingly flexible, but then oddly lacking in other areas. Quite productive, but also quite inconsistent and uncomposable.

Once you've tried a better type system (Rust), it's difficult to go back to C#. People jump through all kinds of hoops to get good performance out of it, and they're mostly able to.

Things I dearly miss from Rust when I'm using C#:

- Associated types in interfaces. (IEnumerable should not be forced to return a type-erased = heap allocated IEnumerator instance.)

- Move-only structs. (Currently, every type with value semantics is trivially copyable, even ref structs.)

➕ show 1 reply
pif • today at 11:16 AM

Nice, but still lacking proper generics (i.e. à la C++ templates) and typedef.

➕ show 1 reply