this post was submitted on 25 Nov 2023
209 points (97.3% liked)

Technology

58061 readers
31 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

An After-School Program Teaches Teens Java and Python::The students also learn how to design board games and video games

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 10 months ago (1 children)

Back when I was in school, corporal punishment was the norm. I would still prefer that over Java.

[–] [email protected] 6 points 10 months ago (2 children)

We get it, you have no idea what modern Java looks like

[–] [email protected] 13 points 10 months ago (2 children)

I know exactly what modern Java looks like, and it could be beautiful. But… legacy cruft and lazy devs make it painful. And tech debt, let’s be honest.

I’d view a greenfield project rather differently, but those are unicorns.

[–] [email protected] 4 points 10 months ago

I’d view a greenfield project rather differently, but those are ~~unicorns~~ written in Kotlin.

[–] [email protected] 3 points 10 months ago (1 children)

I don't know a single language that's immune to the things you just mentioned.

[–] [email protected] 1 points 9 months ago

Haskell is still as beautiful as the day it was first made.

Except for class methods. We don't talk about methods.

[–] [email protected] -5 points 10 months ago (3 children)

I get it, you have no idea what trying to optimize around an ever-changing JIT recompiler looks like

[–] [email protected] 8 points 10 months ago

I think if your project is so performance-critical that small runtime changes can cause performance issues, Java (or any other garbage-collected language) isn't a good choice. That's not the case for the vast majority of projects.

[–] [email protected] 3 points 10 months ago

It looks like something that doesn't happen

[–] [email protected] 2 points 9 months ago (1 children)

Found the guy thinking java can be as fast as C/C++

[–] [email protected] 1 points 9 months ago (1 children)

The just-in-time compiler isn't bad, but the rest of it is. An optimized hot loop has the potential to emit better instructions than a C/C++ compiler not using PGO, but you're never going to see that in any real workload.

If you could rip out/avoid the garbage collector, give it the ability to use escape analysis to avoid heap-allocating every single object, and prevent it from implicitly making every function virtual, then maybe. But at that point, you might as well just a different language.

[–] [email protected] 1 points 9 months ago (1 children)

Ha I love it when I'm right 😁😉

[–] [email protected] 1 points 9 months ago (1 children)

There's a difference between the JIT being able to emit better native code than an unguided compiler, and the language being as performant as another language. Java is never going to be as fast as C or C++, and that's something you can blame its design for.

[–] [email protected] 2 points 9 months ago

They traded speed for safety, that's why, not something right or wrong that you should "blame" anything for IMO.