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

Greentext

5286 readers
1123 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] babybus@sh.itjust.works 28 points 3 months ago (7 children)

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

[–] pinkystew@reddthat.com 11 points 3 months ago (2 children)

We bow to your wisdom, wise gatekeeper

[–] babybus@sh.itjust.works 3 points 3 months 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 3 months ago* (last edited 3 months 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 3 months 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 3 months ago* (last edited 3 months ago) (2 children)

It's like 5 lines of trivial code

[–] Malfeasant@lemm.ee 4 points 3 months ago

Some of us try to understand what we're doing, rather than just copy/paste. It's easy to discount how difficult learning the basics of something is when you're already past it.

[–] sugar_in_your_tea@sh.itjust.works 2 points 3 months ago* (last edited 3 months 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 (4 replies)