Earlier quoted context omitted.
I mean, that's OK though. Not sure why this is considered such a bad thing. You're missing out on some new language features, sure, but Java 8 is still reliable and rock solid. There's lots of companies that have hesitation or even inability to upgrade, hopefully there's at least some initiative and/or direction to do so. A company that is head-in-sand deliberately not upgrading from Java 8 is one thing. A company th…
> I mean, that's OK though. Not sure why this is considered such a bad thing For existing software, sure. But the problem I guess is when there are a lot of newer projects starting and everyone is stuck on the older version
Java 20 / JDK 20: General Availability
141–150 of 356 posts
Re: Java 20 / JDK 20: General Availability
#142Earlier quoted context omitted.
We're still developing this proposal. be patient LOL
Wow that's a proposal! I really like the idea of pattern matching, and I'm glad you're steering clear of modifying switch, but I find the sketches in the proposal pretty hard to read, especially with the combinator examples. I hope you guys take your time and stay more proud of what you leave out than what you put in.
"We didn't do ..." is so incredibly important.
Re: Java 20 / JDK 20: General Availability
#143Earlier quoted context omitted.
What’ the hype with pattern matching? What does it solve?
If you've ever done any assembly programming or worked with other old or low level languages, you may have encountered an environment where you can write simple operator expressions, but you can't compose them. So this is OK: a = b + c d = e - f g = a * d But the compiler doesn't allow: g = (b + c) * (e - f) You have expressions that produce, but they don't compose. You can't produce a value from a more complex, nest…
Re: Java 20 / JDK 20: General Availability
#144Re: Java 20 / JDK 20: General Availability
#145Joining into a synchronous function is an anti-pattern in C# because you consume threads. This seems to be the same, except with the assumption that virtual threads are fine.... But that's not an assumption that can be made by the method writer, right?
Re: Java 20 / JDK 20: General Availability
#146Earlier quoted context omitted.
I mean, that's OK though. Not sure why this is considered such a bad thing. You're missing out on some new language features, sure, but Java 8 is still reliable and rock solid. There's lots of companies that have hesitation or even inability to upgrade, hopefully there's at least some initiative and/or direction to do so. A company that is head-in-sand deliberately not upgrading from Java 8 is one thing. A company th…
There's very little reason not to upgrade from Java 8 at this point. Everything should be a drop-in replacement and there are significant performance benefits (garbage collection is leagues better) to doing so. The bigger problem is that a lot of places are stuck on Oracle JDK - 8u252 is the last free version so a lot of places just decided they'd never upgrade, nor do they want to look at whether Temurin or Coretto…
It isn't at all, in my opinion. Consider the introduction of the module system, for example.
Some libraries moved out of the core language.
Re: Java 20 / JDK 20: General Availability
#147Earlier quoted context omitted.
I don't see a huge benefit for pattern matching in JS outside of it being expression based rather than statement based. Either way, the benefit has to be enormous. It's a feature that can easily break existing code.
How would it break existing code?
You could say “return match…”
It’s not easy to introduce without breakage. Not saying it cannot be done.
But PHP didn’t manage to for example. It also isn’t real pattern matching but that’s a different issue.
Re: Java 20 / JDK 20: General Availability
#148Earlier quoted context omitted.
It's interesting how the introduction of "modules" has forced so many to stick with C++17 and Java 8.
C++ has barely any feature complete compiler implementations and build systems aren’t ready for all of its additions, either (CMake and modules in particular). libstdc++ and libc++, gcc and clang are all not ready for production use or rather untested and/or buggy. Unless you’re targeting MSBuild Visual Studio Solutions and Windows only, C++17 is currently the most up to date, stable, and battle-proven version.
I work with C daily and I'm well aware of its many shortcomings (e.g. its huge list of undefined behavior and its PDP11-centric view of modern architectures), but with some effort I believe it could function as a semi-portable second-level intermediate representation. Nim uses it as such, IIRC.
Compiling to C first would introduce some of its own issues, for sure, but I imagine doing so would alleviate the pressure the C++ standards committee puts on compiler vendors each time they expand the size of the kitchen sink.
Re: Java 20 / JDK 20: General Availability
#149And here I am still on Java 8 :/
I'd still upgrade for the new VM's better performance/security patches or whatever, but I don't need any language changes.
Re: Java 20 / JDK 20: General Availability
#150Now even Java has pattern matching, what's Javascript's excuse? Literally the only feature preventing Typescript from being my perfect language.
What’ the hype with pattern matching? What does it solve?
It's one of those things that when you get used to, you wonder why other languages don't implement it.