News for hackers. Stuff that matters.
Re:New language features since Java 8 to 17 by dukeyukey on Sunday October 24, 2021 @04:26PM (#28981550)
I agree with everything here except the "should stop being taught as the defacto language in computer science curriculums". Realitically, a CS curriculum needs to at least vaguely prep a student for life in the industry, and Java is not only massively popular, but is also a great way of showing how OO is used in practice i.e. kinda badly. No point teaching everyone about beautifully architected Smalltalk programs just to have them work on hacky Java monoliths from 2003 (not to mention BusinessObjectTpyeFactoryGenerator.java).
Re:New language features since Java 8 to 17 by tialaramex on Sunday October 24, 2021 @07:32PM (#28982916)
> Realitically, a CS curriculum needs to at least vaguely prep a student for life in the industry

It's sad that people see the primary teaching language of a CS course as somehow important for this purpose. Sad that students see it this way, sad that their parents see it this way and particularly sad that would-be employers often see it this way too.

Particularly languages favoured by industry are unlikely to offer CS students anything to be passionate about. Yes, it's true that lots more of them will get jobs maintaining code written in a then-current Java in 2005 than will be writing green field Haskell. But if we just wanted code monkeys a three (or four) year degree is massive overkill.

Re:New language features since Java 8 to 17 by weatherlight on Sunday October 24, 2021 @04:28PM (#28981576)
teach javascript, ruby, rust, go, kotlin....scheme.

literally anything else.

Re:New language features since Java 8 to 17 by ksec on Sunday October 24, 2021 @04:30PM (#28981593)
Apart from Javascript. Ruby, Rust, Go, Kotlin and Scheme combined wouldn't equal to half the market Java has to offer.
Re:New language features since Java 8 to 17 by weatherlight on Sunday October 24, 2021 @04:36PM (#28981653)
thats the status quo fallacy.

You can get work in those other languages, nor is an understanding of Java a prerequisite for understanding how to use those other langs, etc.

Re:New language features since Java 8 to 17 by hawk_ on Sunday October 24, 2021 @04:51PM (#28981786)
how's javascript better than java in its design or elegance?
Re:New language features since Java 8 to 17 by weatherlight on Sunday October 24, 2021 @09:55PM (#28983746)
Well for one, it has a repl. As per single core performance, javascript is faster and has had first-class-functions from the beginning.

and you don't need 10 lines of code to print hello something to the screen.

and JavaScript(ES6) is actually multiparadigm.

don't get me wrong, JS has its warts (and oh my god that is indeed the case.) but you can literally run it in any browser any where, which makes for an excellent teaching aid.

Elegance isn't the first word I'd reach for when describing Java

Re:New language features since Java 8 to 17 by kaba0 on Monday October 25, 2021 @04:22AM (#28985589)
> Well for one, it has a repl

Jshell

> As per single core performance, javascript is faster and has had first-class-functions from the beginning

Doubt. And no matter how I count, Java had first class functions for 8 years now, at the very least. Does it really matter when exactly did a language feature got implemented?

> and you don't need 10 lines of code to print hello something to the screen.

jshell: System.out.println(“hello world”)

> and JavaScript(ES6) is actually multiparadigm.

That hardly means anything. There are entirely FP libs available for Java.

Re:New language features since Java 8 to 17 by weatherlight on Monday October 25, 2021 @09:16AM (#28987398)
Javascript is faster than java... sorry... the JVM is slow.

and ugly and verbose and all the things you mentions are bolted on after that fact or not even apart of the core programming language. which hurts your agreement of its being "elegant" or "designed well"

Re:New language features since Java 8 to 17 by kaba0 on Monday October 25, 2021 @10:04AM (#28987937)
I would like to see some benchmarks on that. I like the V8 engine, it is also a marvelous engineering feet, but it is simply not made for the workloads that the JVM can routinely handle, like heap size up to terabytes. It’s not an accident that serious server applications usually run on top of the JVM.

Also, a JIT compiler written in Java running on top the JVM interpreting (though in a clever way) javascript can match the speed of V8, just saying. Look up TruffleJS!

Re:New language features since Java 8 to 17 by hawk_ on Monday October 25, 2021 @05:39PM (#28993474)
i think you're referring to startup time not actual runtime of long running tasks
Re:New language features since Java 8 to 17 by cyberbanjo on Sunday October 24, 2021 @04:57PM (#28981839)
I think a well rounded course would touch all the popular paradigms, and logic.