Damn, time flies. I remember the excitement from the different alpha/beta versions that were coming out in 1994/1995.
Java 20 / JDK 20: General Availability
21–30 of 356 posts
Re: Java 20 / JDK 20: General Availability
#22[flagged]
Every tool has a purpose and Java is a fantastic tool for a lot of use-cases.
Re: Java 20 / JDK 20: General Availability
#23[flagged]
Java (and C#) are still legitimate options for server side code when you want speed and type safety but managed memory.
Re: Java 20 / JDK 20: General Availability
#24[flagged]
Re: Java 20 / JDK 20: General Availability
#25Re: Java 20 / JDK 20: General Availability
#26Literally the only feature preventing Typescript from being my perfect language.
Re: Java 20 / JDK 20: General Availability
#27Re: Java 20 / JDK 20: General Availability
#28This is exciting, can't wait for the LTS release next year... that said, I don't much care for the "case SomeType t when ..." pattern matching syntax, I don't see the benefit of introducing a new keyword over using "if"... or even just "&&". To pinch the example used in[1]: case Tuner t && guitar.isInTune() -> ...; and case Tuner t if guitar.isInTune() -> ...; both seem as clear as case Tuner t when guitar.isInTune()…
In the case of "if", you're right, the grammar doesn't work, both because the syntax of Java already says that the if condition must be enclosed in parentheses and also because an if block is a statement and you need an expression here.
To make either of those work, you'd have to make the rest of the pattern matching syntax much worse.
Re: Java 20 / JDK 20: General Availability
#29Now even Java has pattern matching, what's Javascript's excuse? Literally the only feature preventing Typescript from being my perfect language.
I'm not sure if it's stalled or not. But it's being discussed.
Re: Java 20 / JDK 20: General Availability
#30This is exciting, can't wait for the LTS release next year... that said, I don't much care for the "case SomeType t when ..." pattern matching syntax, I don't see the benefit of introducing a new keyword over using "if"... or even just "&&". To pinch the example used in[1]: case Tuner t && guitar.isInTune() -> ...; and case Tuner t if guitar.isInTune() -> ...; both seem as clear as case Tuner t when guitar.isInTune()…