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

Greentext

4375 readers
1800 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
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] lennivelkant@discuss.tchncs.de 6 points 10 hours ago (12 children)

Aside from the general stupidity, Java is a heavily front-loaded language in my experience. I'm not going to engage in any tribalism about it or claim that it's better or worse than others. As a matter of personal taste, I have come to like it, but I had to learn a lot until I reached a level of proficiency where I started considering it usable.

Likewise, there is a level of preparation on the target machines: "Platform-independent" just means you don't have to compile the program itself for different platforms and architectures like you would with C and its kin, as long as the target machines have an appropriate runtime installed.

Libraries and library management is a whole thing in every general-purpose language I've dealt with so far. DSLs get away with including everything domain-specific, but non-specific languages can't possibly cover everything. Again, Java has a steep learning curve for things like Maven - I find it to be powerful for the things I've used it in, but it's a lot to wrap your head around.

It definitely isn't beginner-friendly and I still think my university was wrong to start right into it with the first programming classes. Part of it was the teacher (Technically excellent, didactically atrocious), but it also wasn't a great entry point into programming in general.

load more comments (12 replies)
[–] Clbull@lemmy.world 14 points 12 hours ago (2 children)
[–] Gumus@lemmy.world 12 points 9 hours ago (3 children)

I'm sure that's Fireship, without clicking the link.

load more comments (3 replies)
[–] PanArab@lemm.ee 4 points 7 hours ago (1 children)

My experience with Java over the last 2 decades or so. Shame Android gave it extra life, thankfully Kotlin exists now.

load more comments (1 replies)
[–] AusatKeyboardPremi@lemmy.world 35 points 15 hours ago (6 children)

I might have agreed a decade or two ago, when I knew no better. But today, I find the tribalism surrounding programming languages comical.

I don’t particularly like Java, but I use it because it pays the bills. Similarly, I use C++ (which I prefer) when my work requires it.

[–] SorteKanin@feddit.dk 32 points 13 hours ago

I don’t particularly like Java, but I use it because it pays the bills. Similarly, I use C++ (which I prefer) when my work requires it.

I mean, anon is not arguing against that. They're saying the language is shit regardless of how much it is used in business. I don't think they are entirely wrong.

load more comments (5 replies)
[–] babybus@sh.itjust.works 27 points 15 hours ago (1 children)

If it took anon 30 minutes to write hello world in java, programming is not for anon.

[–] pinkystew@reddthat.com 13 points 10 hours ago (2 children)

We bow to your wisdom, wise gatekeeper

[–] babybus@sh.itjust.works 3 points 7 hours ago (1 children)

Thank you. If you bothered to read a 5 minutes tutorial instead of posting to 4chan, you could also reach this level of knowledge.

[–] pinkystew@reddthat.com 1 points 6 hours ago* (last edited 6 hours ago) (1 children)

Don't be mad, you're the one that commented lol. It's like you're choosing to be upset

[–] babybus@sh.itjust.works 1 points 5 hours ago

I thanked you for your reply and suggested reading a tutorial. How does that make me mad and upset? You're acting weird.

[–] lurklurk@lemmy.world 3 points 7 hours ago* (last edited 7 hours ago) (2 children)

It's like 5 lines of trivial code

[–] sugar_in_your_tea@sh.itjust.works 0 points 4 hours ago* (last edited 4 hours ago)

And most IDEs will autogenerate it for you.

That said, I think it highlights everything I hate about Java:

public class MyClass {

Why does it need to be a class? I'm not constructing anything?

public static void main(String[] args) {

Why is this a method? It should be a top-level function. Also, in most cases, I don't care about the arguments, so those should be left out.

System.out.println("Hello world!");

Excuse me, what? Where did System come from, and why does it have an "out" static member? Also, how would I format it if I felt so inclined? So many questions.

And here are examples from languages I prefer:

C:

#include "stdio.h"

Ok, makes sense, I start with nothing.

int main() {

Makes sense that we'd have an entrypoint.

printf("Hello world");

Again, pretty simple.

Python:

print("Hello world")

Ok, Python cheats.

Rust:

fn main() {

Ooh, entrypoint.

println!("Hello world");

I have to understand macros enough to realize this is special, but that's it.

In C, Python, and Rust, complexity starts later, whereas Java shoves it down your throat.

load more comments (1 replies)
[–] _____@lemm.ee 30 points 17 hours ago (6 children)

C# masterrace and I'm tired of pretending it's not

[–] sugar_in_your_tea@sh.itjust.works -2 points 4 hours ago* (last edited 4 hours ago)

C# is nicer Java, but I think it's still fundamentally a poor language.

Rust master race:

fn main() {
    println!("Hello world!");
}

Unfortunately, the time you save typing you'll spend compiling, so there's that...

[–] EnderMB@lemmy.world 5 points 10 hours ago

After close to two decades of programming, C# is still the best language I've used. While some of the newer features seem a bit weird, I'd say it's one of the few languages that has never got in the way and has just let me write code that made sense. Even with all the improvements Java has made over the years it's still nowhere near as good as what C# was like maybe 15 years ago.

The same goes for everyone's other "fav" language, Python. Ruby has been a better beginner scripting language than Python for many years, and while Rails is definitely a ghetto, as a language Ruby is great at teaching great programming fundamentals.

load more comments (4 replies)
[–] jrgn@lemmy.world 28 points 18 hours ago (1 children)

Not using Eclipse helps. Using Scala helps even more

load more comments (1 replies)
[–] svcg@lemmy.blahaj.zone 140 points 23 hours ago (1 children)

I also think Java is shit, but if you manage to get a NullPointerException while writing a hello world program, maybe anon is just not cut out for computers?

[–] navi@lemmy.tespia.org 76 points 20 hours ago (4 children)

I always loved that Java has a NullPointerException but doesn't have the concept of pointers in the language (only references).

[–] starman@programming.dev 16 points 15 hours ago

C# has NullReferenceException and it actually makes sense.

load more comments (3 replies)
load more comments
view more: ‹ prev next ›