Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The correct amount of OO in any language is ”as little as possible”. It’s quite possible to do this well in C#. There are levels of OO to not just on or off. E.g there is a difference between order.Process() and OrderProcessor.Process(order) and GetOrderProcessor().Process(order)

Which level of OO is correct is context dependent.

A C codebase, and a C# codebase can have the same amount of OO in it. But while its easy-ish to write Procedural or functional C# it’s quite cumbersome to write good OO in C.



It’s possible to write good code in JavaScript too; VSCode is a great example of this.

However, that doesn’t mean the language won’t fight against you. Yes, you can write data-oriented code in C# as well, but most people don’t because C# has historically been an OO language, and doing so would feel jarring to many. As a result, getting dropped into an existing C# codebase won’t be pleasant if you don’t enjoy GoF-style OO.

Go, Rust, and Zig don’t have this issue, but the latter two don’t directly compete with C#. Go does and is preferred by those who want to avoid traditional OO. That’s hard to do in an ecosystem that’s pivoting only because people are moving away from it.


It’s obviously more likely to find a C# codebase riddled with obsolete OO patterns than a Rust one.

But I think the strongest signal for that would rather be e.g the code being related to web/service backends of some kind. I much more rarely see that kind of thing in any other context (games, mobile, scientific, desktop, …).

I stay as far as possible from web stack stuff more than specific languages, but probably for the same reason.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: