7 ms·
> ...actively seeks to banish any positive sentiment around effective tools Effective at what? Want GC lang with lots of libraries? Use Java. Want GC free la
by Ygg2 2y ago
> ...actively seeks to banish any positive sentiment around effective tools
Effective at what?
Want GC lang with lots of libraries? Use Java.
Want GC free lang with safety? Use Rust.
Otherwise just use C. Or C++.
For me C# lies in this awkward spot. Because of past decisions it will never have quite the ecosystem of Java. And because GC -free and GC libraries mix as well as water and oil, you get somewhat of a library ecosystem bifurcation. Granted GC-less libraries are almost non-existent.
- DeathArrow 2y agoI worked in both C# and Java. And other languages. Resuming C# and Java to "GC languages with lots of libraries" doesn't accurately depict neither C#, nor Java. Since we discuss C# here, it is a good jack of all trades language where you can do almost anything, with decent performance, low boilerplate. It's easy to read, easy to learn and you have libraries for everything you need, excellent documentation and plenty of tutorials and examples. A great thing is that for every task and domain there is a good library or framework that most developers use, so you don't have to ask yourself what to use and how and you find a lot of documentation, tutorials and help for everything. Java it's a bit more boiler plate-y, had a bit less features and ease of use and had many libraries and frameworks that did the same thing. Had Java been better, Kotlin wouldn't need to be invented. >Want GC lang with lots of libraries? Use Java. Want a fast to develop and easy to use language? Just use C#. >Want GC free lang with safety? Use Rust. Want a language which you can use for almost eveything? Web front-end, web backend, services, microcontrollers, games, desktop and mobile? Use C#. >Otherwise just use C. Or C++. Or whatever works for you. Whatever you like, find fun and makes you a productive and happy developer. There is nothing wrong in using C or C++. Or Python. Or Haskell.
- Ygg2 2y ago> Since we discuss C# here, it is a good jack of all trades language where you can do almost anything, with decent performance, low boilerplate. That's basically modern-day Java, with Lombok and other tidbits. Furthermore, if I recall correctly, Java has better performance on web benchmarks than C#. > Had Java been better, Kotlin wouldn't need to be invented. Kotlin was invented to make a sugary version of Java, and thus drive more JetBrains sales. It got popular because Oracle got litigious. As someone who's been on the Java train for almost two decades, what usually happens, if any JVM Lang becomes too popular, Java has the tendency to reintegrate its features into itself. > Whatever you like, find fun and makes you a productive and happy developer. There is nothing wrong in using C or C++. Or Python. Or Haskell. Sure, assuming it fits the domain. Like, don't use Python for kernel dev or Java for some obscure ML/AI when you could use Python.
- Kipters 2y ago> That's basically modern-day Java, with Lombok and other tidbits. I wouldn't call Lombok "modern", more like "a terrifyingly hacky way to tackle limitations in the language despite the unwillingness to make the language friendlier" and a far cry from what source generators can do in C#
- xxs 2y agoGetters and setters are a mediocre design choice, not a limitation. Records have existed for years, too.
- e3bc54b2 2y ago> Records have existed for years As a fan of Records, this is a punch to the gut. The ecosystem is years and years away from using records. Almost every huge monolith decade+ project is still on Java 8, those who moved to something new still can't be liberal with them, because oh look, none of the serialize/deserialize libs can work with them because everything, to this day, abuses reflection for generating objects like a giant fucking hack it is. Apology for the rant, but I migrated a big project to 21 early this year, am in the middle of migrating another 1M+ line codebase to 21, and the sorry state of records is such a sad thing to witness. I give a decade before records are anything but 'a fancy feature'.
- deleted 2y ago[deleted]
- xxs 2y agoIt's a fair point of stuck w/ java8, yet the reference was about "modern java". With that said - lombok is not needed at any form there either, use a c-tor with fields and make the public final. If you have too many fields in a class, it's likely a good idea to split it regardless. In all cases dumb getter/setters are just public fields but taking more meta space (and larger byte code, the latter has some consideration when it comes to inlining) Also, if I had 1M LOC and my serialization/communication libraries didn't support whatever I've picked - I'd patch the libraries to support it.
- lmm 2y ago> Java it's a bit more boiler plate-y, had a bit less features and ease of use Maybe slightly. But the difference is too marginal to change languages over. > had many libraries and frameworks that did the same thing Maybe, but it also has many more libraries doing the one obscure thing that you need for your domain. In a vacuum, C# is a very good language, probably better than Java (as it should be given that it was able to learn some lessons from early Java). But in the wider world of programming languages they really are extremely close to each other, they're suitable for exactly the same problems, and Java has a substantially greater mass of libraries/tooling and probably always will do.
- high_na_euv 2y agoJava ecosystem is more fragmented and inconsistent than C# C# is better designed lang, has really strong tooling and ecosystem and well designed std lib