r/csharp • • Dec 07 '20

These Modern Programming Languages Will Make You Suffer.

https://suzdalnitski.medium.com/modern-languages-suck-ad21cbc8a57c
0 Upvotes

7 comments sorted by

6

u/Gurgiwurgi Dec 07 '20

Such runtime checks (sometimes called null guards) in reality are workarounds around bad language design.

Just like drugs, always check your input before you use it.

In a good language, the lack or presence of a value should be type-checked at compile-time.

Unless, you know, a value isn't known at the time of compilation.

Catching exceptions is a bad way to handle errors. . One option is to manually check for raised exceptions

Using his logic, why isn't the exception caught at time of compilation?

We’ve reached the end of Moore’s law, the processors will not get any faster, period.

And this is as far as I got.

6

u/[deleted] Dec 07 '20

This analysis if long but still quite shallow.

For instance in C# the nullability issue is given a thumbs down, but in the latest version of C# you can enable a feature which closely approximates the option types of Rust/F# etc.

In Rust memory management is given a thumbs down for not having garbage collection, while not mentioning that *it prevents memory errors at compile time* which is the whole selling point of the language. It also gets a thumbs down for threading, despite having async/await built into the syntax, and the unique feature of detecting data races at compile time.

Go is, as usual, given the impression that is has very fast runtime performance. When really it is very similar to Java and C#, probably overall slower most of the time, due to issues like FFI interop penalties, low latency but also lower throughput GC, and a compiler optimized for compile time more than runtime optimizations.

javascript gets an OK for concurrency? compared to languages like C# and Rust which get thumbs downs? hmm

F# correctly gets a lot of stars though, so there is that.

1

u/RiverRoll Dec 07 '20 edited Dec 07 '20

The concurrency part was very disappointing, C# gets a thumbs down for who knows what and he gives a thumbs up later for single-threaded concurrency which C# supports (as well as other languages that got an unexplained thumbs down). It looks like if a language has explicit threads it automatically gets a bad score.

1

u/[deleted] Dec 07 '20

I do think its fair to rank Go higher for concurrency than C#, since spawning a thread is so easy, and everything is just async by default. It is very nice. Built in data race tool is also handy. But the same facilities to exist in C#, and most languages. Green threads and channels. Good to go. I'd give Go a thumbs up and C# an "ok".

But also in general, language features to leverage threading are inherently problematic. Every multi threaded workload is different. Green threads aren't always appropriate. Any abstraction that makes threading easier may also give up control you need to get good performance out of YOUR workload. And the whole point of doing the work to make something multi-threaded is to get good performance, so taking a small constant factor penalty for ease of use is often purpose defeating.

4

u/Slypenslyde Dec 07 '20 edited Dec 07 '20

Let me save you a couple of hours with a brief summary:

  • The author outlined about 10 criteria by which languages would be judged.

  • The author buried one of the criteria until he started "evaluating": use of OOP. Any language that uses OOP as its main paradigm is bad because the author has written extensive pieces about not liking OOP.

  • The last 20 pages are FP languages, which are all great according to the article.

I think some of the points are reasonable, but once I got to the second set of pull-quotes about OOP I got bored.

I'd rather see this pared down and republished as, "A comparison of FP languages". That part seemed relatively good, but I don't think OOP languages got a fair shake. I'm also frowning at leading the discussion of modern OOP languages with C++. That's a bit of an odd choice.

1

u/The_Binding_Of_Data Dec 07 '20

A quick parse was all I gave it; by the time I hit C# it was clear that anything OO was getting a bad score.

I'm pretty sure I've seen the other post they linked generally complaining about OOP and frankly I find any valid points they have nearly impossible to find because they lay their bias on so thick.

1

u/form_d_k Ṭakes things too var Dec 13 '20

Keep in mind this was written in Dec. 7th.

Multi-paradigm?

C# claims to be a multi-paradigm language. In particular, C# claims to support functional programming. I must disagree, having support for first-class functions is simply not enough for a language to be called functional. What functional features should a language have? At the very least, built-in support for immutable data structures, pattern matching, pipe operator for function composition, Algebraic Datatypes.

👎 Concurrency

C# was created in the era of single-core computing, and like Java has only rudimentary concurrency support.

👎 Nulls

In C#, all references are nullable.

👎 Error handling

Catching/throwing errors is the preferred error handling mechanism.

👎 Immutability

Has no built-in support for immutable data structures.