this post was submitted on 13 Nov 2024
835 points (96.1% liked)

Greentext

4437 readers
1071 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 4 days ago* (last edited 4 days ago)

Anyone who knows me knows that I hate Java with the fire of a thousand suns, but this is just sad. Most of these are true of any programming language. There are plenty of legitimate reasons to hate Java besides the fact that its concurrency utilities are as utterly shite as those of its 90s contemporaries, like the fact that it does not support multiple inheritance, or remote interface implementation, or any form of namespacing besides the goddamned filesystem, or unsigned integers, or string formatting. Or you could rant about the primitive type/object dichotomy and how you can't use primitive types in generics, or the fact that type erasure is a thing and you can't return a generic type from a method because javac is too stupid to remember what generic parameters you passed to a class, or the JVM's atrocious memory efficiency, or the fact that it's not backwards compatible thus requiring end users to install multiple versions of the JVM for different projects, or

[–] [email protected] 15 points 6 days ago (1 children)

Forgot the JVM eating the entire machine's RAM for breakfast

[–] [email protected] 19 points 6 days ago

JVM is like a gas. It expands to fit it's container, however large that is.

[–] [email protected] 8 points 6 days ago (3 children)

I still think Java is good for teaching newbies precisely because it will throw an error quickly if they are doing it wrong.

[–] [email protected] 8 points 6 days ago

Rust over there like

Hey kid, tired of putting off your problems?

[–] [email protected] 4 points 6 days ago

So will so many better languages, more so actually.

[–] [email protected] 4 points 6 days ago (1 children)

So will pretty much anything except JS.

[–] [email protected] 4 points 6 days ago

Arguably there’s Typescript now, too.

[–] [email protected] 7 points 6 days ago (1 children)

Java is terrible and I hated it but I feel like this stuff is not why, this mostly just seems like stuff that most powerful object oriented languages do.

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

Java is amazing and I love it, and I agree that this is not really a good list of problems. (Not that I expect green texts to be well thought out, rational, real, fair, or anything other than hyperbolic rants lol.) There are good reasons to critique it and the ways people use it, but this isn't it.

Particularly funny is the one about race conditions. That's something you'd have to deal with in any sort of multi threaded environment.

load more comments (2 replies)
[–] [email protected] 5 points 6 days ago
[–] [email protected] 3 points 6 days ago (8 children)

Could be worse, could be programming Javascript (or Typescript).

[–] [email protected] 7 points 6 days ago* (last edited 5 days ago) (3 children)

A text file with a script block and nothing else, containing a console log, is all you need. You already have all the boilerplate to run it in any computer. No extra dependencies, no installing anything. Literally just a notes editor app. This is a valid HTML file:

<script>
console.log("Hello World")
</script>
load more comments (3 replies)
load more comments (7 replies)
load more comments
view more: next ›