top | item 46181738

(no title)

troymc | 2 months ago

I made a poster showing how one might write a Hello World program in 39 different programming languages, and even different versions of some common languages like Java:

https://troymcconaghy.blog/2025/01/13/39-hello-world-program...

discuss

order

pron|2 months ago

Nice, but as of JDK 25 (the preview JEP 445 has become the permanent JEP 512), the canonical Hello World in Java is:

    void main() {
        IO.println("Hello World");
    }

prmoustache|2 months ago

Not a java developer but why the void? Shouldn't your main function and program return an integer?

troymc|2 months ago

Thanks, I made a note to update that someday.

throwaway150|2 months ago

Cool poster! If you don't mind me asking, would you share what tools you use to create this poster? You've got syntax highlighting going on there too. What did you use for that?

realo|2 months ago

This is super cool! Now someone should make a similar poster with Hello World sent to a serial port.

Bonus points if it is a RS485 port.

Some language that seem to look good might show their true ugly face...

pmdr|2 months ago

Objective C is by far the weirdest on that list.

saagarjha|2 months ago

Objective-C is basically Java so I wouldn’t call it that weird.

watersb|2 months ago

Smalltalk, but in C