this post was submitted on 14 Jul 2024
478 points (96.9% liked)

linuxmemes

20454 readers
135 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 month ago (2 children)

Faster, sure. Efficient, fuck no. With Java you have to run around and write ton of boiler plate code to do something simplest in nature.

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

Could say the same for C/C++.

But yeah I'd like it if the features given by Lombok were standard in the language though it's not a big deal these days since adding Lombok support is very trivial.

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

You shouldn’t use Lombok, as it uses non-public internal Java APIs, which is why it breaks every release. At one point we had a bug with Lombok that only resolved if you restarted the application. Switching off of Lombok resolved the issue.

Just switch to kotlin. You can even just use Kotlin as a library if you really want (just for POJOs), but at this point Kotlin is just better than Java in almost every way.

[–] [email protected] 3 points 1 month ago

I agree but I have tried like hell to get my team to use Kotlin but it's hard to convince upper management. The team is reluctant to switch as well.

Using Lombok is the next best thing.

Though for POJOs that are immutable you can use record classes now.

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago) (1 children)

I'm mainly talking efficiency in terms of energy use. I won't deny that some ugly decisions have been made with Java :D

[–] [email protected] 0 points 1 month ago (1 children)

Energy use? That's a pointless metric. If that is the goal then whole idea of desktop should be scraped. Waste of memory and hard drive space. Just imagine the amount of energy wasted on booting GUI.

[–] [email protected] 1 points 1 month ago (1 children)

Have you ever heard of datacenters, portable devices or climate change?

[–] [email protected] 0 points 1 month ago

If you want to talk about climate change then electronics is the wrong place to point the finger at. For start look at cement manufacturing. It requires huge amounts of energy to produce even though we have eco-friendly variants ready to go. And cement production amounts to 8% of all greenhouse gasses released annually.

Hell, just ban private jets and you've offset all of the bad things datacenters ever made. Elon had 10 minute flight to avoid traffic which consumed around 300l of fuel. Royal family makes so many flights a year that you could go into the wild and eat bark until the rest of your life and you wouldn't be able to offset their footprint in thousands of lives.

Bill Gates himself talks a lot about reducing carbon footprint we make and yet he refuses to sell his collection of airplanes. He has A COLLECTION of them.

Using higher level language that requires more operations than assembler is not a thing to worry about when talking about climate change. Especially without taking into account how much pollution have those managed to reduce by smartly controlling irrigation and other processes.