Hacker News new | ask | show | jobs
by flohofwoe 842 days ago
Java or C# required me to wrap every piece of code into class boilerplate (I think that has changed in the meantime, but just as an example).

In C++, Visual Studio will bombard you with all sorts of silly C++ Core Guideline advice if you try to write simple and straightforward code.

Finally, the standard libraries and 3rd party libraries might also get in the way if 'simple and straightforward' clashes with the idiomatic style of the language.

3 comments

Probably even better to pick PHP then, large standard library included, open foo.php to code, no main function required, just start writing, no build step, can output to stdout or http without effort
Sure, but it depends on the task. For instance if I need to talk to operating system APIs directly then C (or ObjC on Mac) might still be the better choice. Best tool for the job etc... I guess the gist is that languages that are built around the idea of high level abstractions and enforcing a specific coding style on large teams might not be the best language for exploring and prototyping.
C# has been focusing on terseness for years now but is kept getting bundled together with Java :(
I'm somewhat aware of the improvements, but at the same time I haven't seen much of that terseness in the real-world C# code I'm dealing with (typically Unity gameplay scripting code).
Unity is stuck on an ancient language version unfortunately and has seen none of the runtime improvements of vanilla .NET due to using custom mono fork and build process. Hopefully this will change with the release of Unity 6. With that said, even old C# can be written in a compact way. Most suffering is completely self-imposed and can even be observed proliferate in languages like Rust with such developers starting to adopt them.
There are other languages than C, Java, C# and C++.