4 ms·
On the other hand, I find it extremely difficult to follow C# code. It's a lot of type gymnastics and dependency injection noise that makes it hard to understan
by haolez 3y ago
On the other hand, I find it extremely difficult to follow C# code. It's a lot of type gymnastics and dependency injection noise that makes it hard to understand where's the actual business logic.
- soulbadguy 3y agoAgree. However i think this is mainly an artifact of API/framework designed in the 2000 and 2010 with over-enginered and over used designed patterns from the GOF. Both java and C# have their root deep in enterprise land were those are still sadly too common. Modern framework are a bit better.
- haolez 3y agoAnd type gymnastics seem worth it on something like F#, but on C#, it feels a lot like bureaucracy with not a lot of benefit.
- replwoacause 3y agoI dislike C#. Too much ceremony for me. I want type safety without a ton of boilerplate. Is there any compiled language that offers this? Or languages built for the web? Go maybe? Not interested in a whitespace sensitive language though.
- neonsunset 3y agoWhat kind of boilerplate are you seeing? If it's an old project, that's a given but the culture is changing and community is slowly accepting terseness and performance as key factors to consider when writing new code.
- soulbadguy 3y agoI would have say F#, but it's white space sensitive, and sadly pretty much a dead language by now. Pretty much all the new-ish language have less boiler plate than C#/Java. Kotlin and swift are somewhat good.
- lmm 3y ago> I dislike C#. Too much ceremony for me. I want type safety without a ton of boilerplate. Is there any compiled language that offers this? Or languages built for the web? Scala might be what you're looking for. (Or Haskell, but that's a bigger leap). You can write code that looks like Python/Ruby (some libraries are quite symbol-heavy, but you don't have to use them; check out lihaoyi's libraries for some Python-inspired simple interfaces), but everything's fully typed. And it has an excellent JavaScript backend that integrates with typescript/definitelytyped for using web libraries.
- rewgs 3y agoProbably Go, yeah. I'm a big fan of Python and have really enjoyed learning Go.
- cryptos 3y agoBut would Go really reduce the "ceremony" compared to C#? I doubt it. Just look at Linq (functional programming APIs in C#) and compare this to the typical Go approach with auxiliary lists and for loops! Or what about error handling? Or null safety? Not that cool in Go, I think.
- jinushaun 3y agoWhat boilerplate? Just use var everywhere and the compiler will type it for you. I think the main problem with C# is that even though you can write scripty “pythonic” C# since like 2010, people are still coding C# likes it’s early 2000s enterprise Java. The .NET library doesn’t help either, since it sets the “style guide” that many developers follow.
- cryptos 3y agoI would suggest Kotlin. It is concise and readable and the language itself is a bit leaner than C# (delegates are, in my opinion somewhat redundant, if there are first-class functions, for example).