4 ms·
When it comes to language itself, I don't see there being any good reason to pick java over c# these days. If you compare ecosystems then maybe, but it terms o
by Xeamek 3y ago
When it comes to language itself, I don't see there being any good reason to pick java over c# these days.
If you compare ecosystems then maybe, but it terms of language features I don't know why would any1 ever pick java from scratch in this day and age.
- darthrupert 3y agoOnly Windows developers should pick C# for anything, though. From my privileged point of view, that's a tiny minority. But not sure why anyone would choose Java over Kotlin now that Kotlin exists.
- neonsunset 3y agoThis stopped being the case eight (8) years ago. This what .NET is often used with today (in terms of dev, user and hosting stories): - Linux containers with ASP.NET Core - AvaloniaUI and Unity/Godot/Stride (all cross-platform) - Rider (on macOS in particular)
- forty 3y ago"Often" seems a strong word. I understand that it's possible, but I haven't seen many projects using C# or other CLR languages for containerized Linux app
- neonsunset 3y agoThat's the default deployment target for any new or migrated application. I'm saying often because it is not the only one.
- phito 3y agoYou're very out of date then :)
- darthrupert 3y agoWell, if these are valid arguments, I'd rather go with Swift for a more modern language.
- neonsunset 3y agoUnfortunately, Swift is slower and has worse tooling, especially on Linux. I like it a lot as a language but it is hard to justify its usage outside of macOS when C# exists. Related: https://news.ycombinator.com/item?id=40045524 https://news.ycombinator.com/item?id=40045524
- gigatexal 3y agoIn the data engineering space JVM languages are probably neck and neck or even favored over Python. Hadoop, Spark these things. I know big firms like Apple — where I’d love to end up doing DE stuff — are big on Java and Hadoop style things. I just know I need to branch out. I’m decent at Python and SQL but I could learn some more.
- noelwelsh 3y agoApple use Scala, not Java, for that sort of thing. At least that was the case last time I interacted with them. Here are some of the suggested starting points for Scala: https://docs.scala-lang.org/ https://docs.scala-lang.org/ Here are the Scala books I've written: https://noelwelsh.com/landing/books/ https://noelwelsh.com/landing/books/ Here's the coding group I run: https://www.scalabridgelondon.org/ https://www.scalabridgelondon.org/ ScalaBridge's online events have attendees from across Europe.
- ape4 3y agoScala was a nicer Java but now Java is nicer
- beastman82 3y agoThis is just objectively false. The type system is weaker, the syntax more verbose. No good functional programming libraries in Java. Pattern matching, syntax sugar. The list goes on. I had to go back to Java from Scala and it's very much behind.
- kitd 3y agoSyntax is only part of the equation. And comparing syntaxes is never "objective".
- pron 3y agoJava does have pattern matching, but while some programmers certainly like having more features and a stronger type system to be, there's clearly nothing objective about that preference, considering that the only languages that are as popular as Java or more these days are JavaScript and Python. Of course, no one argues that more popular necessarily means better, but since software has huge economic value (and the vast majority of software is done to further economic activity) you'd expect some correlation between "better" and "more value". Given that for decades now the market consistently prefers the languages that you consider "worse", then one of two things: either there's a huge market inefficiency that somehow no one manages to exploit, or that what you consider better is not, in fact, objective. In short, there's no doubt different programmers have different preferences on what they consider better (though those preferences are clearly not distributed evenly), but if you want to claim that something is objectively better, it has to be better by some objective measure that is related to the actual value that people expect to gain from software. The bigger the gap between your characterisation and market behaviour, the harder it would be to support claims of objectivity.
- pron 3y agoBecause Java's combination of performance, productivity, observability, and stability is unmatched. The average codebase lifetime of large, important server software is over a decade, so not only do you want the first three, but to get a good return on your investment, you also want the fourth (over time, different parts of the codebase will see more or less development, and you don't want to spend money on maintaining parts that you don't want to focus on). Now, it's true that the biggest Java shops, where new projects are regularly developed in Java, are traditional businesses like Apple, Amazon, Google, Netflix, Alibaba, Tencent, and other Fortune 500 companies -- companies that care a lot about the value (and cost) of the codebase not just in the moment but over time -- whereas smaller companies are more diversified in their language choice, but they, too, often adopt Java more as they grow.
- Xeamek 3y agoC# and .net platforms matches (or more often even exceed) java in all those categories. Looking at what big companies are doing is also weak argument, especially since Google literally developed their own language which slots in the same space as Java. Maybe not exactly the same, but pretty close. Again, if you need compatibility with existing code - that it's a decent argument. But in terms of language itself? No good reason
- pron 2y agoGoogle is a major Java shop, and for big projects compatibility is certainly at the top of requirements because big codebases last for a long time, and compatibility directly translates to increased future returns on investment. I don't think .NET quite matches Java on the other aspects (certainly it tries to add lots of language features while Java tries to avoid adding many features, but having more or fewer features is a matter of personal preference) and its GCs aren't as good, but while these things are arguable (because Java and .NET have different advantages and disadvantages compared to each other), its compatibility story is poor, and not just in comparison to Java.