5 ms·
No one wants to: a) migrate their production server to a new language for a weak reason b) learn new syntax when the old one works fine I am sure Scala 3 is
by nowherebeen 4y ago
No one wants to:
a) migrate their production server to a new language for a weak reason
b) learn new syntax when the old one works fine
I am sure Scala 3 is great but I see no reason to learn it. The constant change with Scala with only slight performance improvement doesn’t make me excited. I would rather spent my time learning Rust.
- g42gregory 4y agoI am curious whethere there is anything wrong with staying with modern Java? I haven't looked at Java ecosystem for a while, just Python and C++ these days, but I remember they were aggressively putting features out that were making Scala less needed. What is the situation right now?
- rayxi271828 4y agoThis is exactly my sentiment as well. I'm still deeply in the Java ecosystem. It was stagnant for a while, especially between Java 5 and 8 (which spanned multiple years). But now that it's modern, and it's moving quickly... I see less and less need to use these "better Java" languages.
- g42gregory 4y agoInteresting. There are tons of great new languages these days, but the sheer mass of existing libraries, documentation, tooling, etc... make it very difficult to break in and gain momentum. I feel that three major languages emerged to dominate (not to be confused with being loved!), at least for now: Python, Java and C/C++/C# block. All for very different use cases. And JavaScript for the browsers, of course.
- Macha 4y agoThe problem with seeking employment in "modern Java" is like doing the same for "modern C++", so many teams with Java 8 (or older)/C++98 codebases that drown out the options to do modern work. Plenty of them might advertiser planned/inprogress updates while hiring but then put roadblocks on the way of ever doing them.
- dopidopHN 4y agoIt got suddenly better. The effect are visible in my last two jobs. It’s still good old verbose Java. But the entreprise Java insanity is over and other stuff than spring emerge ( Java Lin for instance ) Functional programming is still cumbersome. Having a map of <enum,function> for instance requière some googling and weird syntax. But it’s possible. Getter/setter are gone. Immutable records replace them. Next version the thread model gets an update. No more system thread. So spawning them carelessly will be possible ( ala Coroutine in go)
- nowherebeen 4y agoWhat makes Scala great is their language syntax. The ability to do higher kind functions makes it a joy to work with. I program much faster than I would Java. I am also not a big fan of OOP myself. The downside is that it’s slow to compile and it’s no faster than any Java based languages. I am slowly realizing if I want performance, I need to forgo Scala altogether.
- kaba0 4y agoHave you tried GraalVM (not native, but as a pluggable JIT compiler)? It has slightly better escape analysis which might help Scala, which tends to create small helper classes. Nonetheless, hotspot and graal and hand-in-hand, but you may find one working better for your particular situation.
- lmm 4y agoMost of the reasons to use Scala still apply. Java has made some improvements but is still a long way behind, e.g. Java "has" "pattern matching" but only a very basic, very restricted form of it, and that's if you're using the latest version. Java "has" "optionals" but limited in a way that makes them useless in practice. Fibers have finally landed, about a decade later than promised, but the ecosystem hasn't even begun to adopt them yet and who knows what edge cases or issues may turn up. The type system has made some limited progress, but writing Java still means chafing under many of the same restrictions that were noticeable 20 years ago. It's great to see Java finally starting to move again, but frankly if you think "modern Java" is good then you could've had all that for 15+ years with Scala - why do you want to wait 15 more years for the other half of what Scala offers?
- zaphirplane 4y agoWhat makes option useless
- lmm 4y agoDeliberate weird behaviour around nulls. In particular you can't have Some(null), which means you can't really use it to solve the problems it's meant to solve - one of the key motivating examples for why you want optionals is that if Map.get(x) returns null, you don't know if that means there's no mapping for x in the map, or there's an entry with key x and value null. So the idea would be to add Map.safeGet or some such which returns Option<V>, and then if it returns None there's really no mapping, and if it returns Some(null) then there's a mapping with value null. But you can't do that in Java because in the standardisation process they decided they... didn't want to allow it.
- AzzieElbab 4y agoI thought it was wrapping successful Java calls that return nulls. Try.toOption caught me off guard with this behaviour
- 4y ago
- AzzieElbab 4y agoCarpal tunnel syndrome would be one. Still very hard to write expressive code in Java without tones of boilerplate
- kaba0 4y agoThat somehow neger brought up against Go, which is in fact much more verbose than Java. I recommend trying Java out again if you haven’t been up-to-date, because I think it is more about how we remember it vs how it actually is (but it may not apply to you). Also, Java IDEs are still the best imo, so I wouldn’t be surprised if in fact you would type less for equivalent Java programs than in case of a much less verbose language sheerly due to the killer autocomplete.
- AzzieElbab 4y agoI never said Go is a better language than Java. Go might have a better modern runtime, but the language itself is meh. Wrt to IDE vomit, imho it is still very counterproductive when someone has to read it
- lmm 4y ago"Constant change" is pretty misleading. This is the language's first major version bump in 16 years since its first public release, and there were few significant changes between 2.10 (2013) and now. I struggle to think of another language that has been that stable; even Java has had more breaking changes (at least in practice) in the same time period.
- mjard 4y agoPython 2 -> 3?
- lmm 4y agoWhat are you trying to say? Python has had much bigger changes than Scala over the same time period - indeed I'd say that the changes of some Python "minor" updates are comparable to Scala's "major" update.
- salad-fan 4y agoStill at Clojure 1.x
- EdwardDiego 4y agoThe Scala ABI is the constant change that broke me. Oh, you want to use 2.13 but your dependency only ships for 2.11 and 2.12? You're happy with 2.11, but your dependency now only ships bugfixes in the 2.12/2.13 libs? Hmm. Java's ABI is far more stable.
- lmm 4y ago3.0 is backwards compatible with libraries built against 2.13 and they intend to continue that, FWIW.
- EdwardDiego 4y agoOkay, that's awesome, thank you for letting me know :)