Re:A modern “Hello, World” program requires more than just code
by ganstyles on Thursday March 05, 2020 @11:43PM
(#22501050)
Yeah! And while we're on the subject, is the ", World" even necessary?
[ Parent
| on HN ]
Re:A modern “Hello, World” program requires more than just code
by jfengel on Friday March 06, 2020 @09:13AM
(#22503678)
It's cute. "Hello" is just greeting the programmer, as if it were one person to another. "Hello, world" is like a new baby introducing itself to a planet. It's both tiny and momentous; the contrast is humorous. That feels friendly.
Especially viewed in its original context, introducing a new programming language (C) to a planet that wasn't quite as crowded with programming languages as it is today.
Since then it's just tradition. Feel free to leave it out. But it's iconic for a reason.
Re:A modern “Hello, World” program requires more than just code
by sk0g on Thursday March 05, 2020 @11:49PM
(#22501063)
Traditions are traditions, and an industry as young as ours needs to hold on to the very few we have!
Moving goalposts around on the Hello World code golfing world has some 'consequences' - there's languages with built in hello world that try and get it printing with minimal code, and removing the comma, for example, would invalidate that hack.
Re:A modern “Hello, World” program requires more than just code
by superasn on Friday March 06, 2020 @12:07AM
(#22501130)
One tradition I'm happy got lost in the way is using FOO, BAR, BAT in examples. It made the simplest examples hard to understand and those words never made any sense to me.
It's always better to use contextual words in most examples.
edit: for more clarity this article (1) explains it quite well
Re:A modern “Hello, World” program requires more than just code
by sk0g on Friday March 06, 2020 @12:12AM
(#22501151)
I'd honestly rather have a,b,c than that! Nobody writes code with such placeholder variable names, so why demonstrate it that way?
Placeholder variables like i and j don't count! Foo, Baz, etc are annoying to read too, IMO.
Re:A modern “Hello, World” program requires more than just code
by runarberg on Friday March 06, 2020 @12:33AM
(#22501217)
I use foo, bar, baz, etc. all the time when I’m writing tests. But I agree generally it is better when examples use meaningful name `cd /path/to/file` as oppose to `cd /foo/bar/baz`
Re:A modern “Hello, World” program requires more than just code
by kunglao on Friday March 06, 2020 @12:14AM
(#22501160)
What's wrong with FOO? It's fun to say and can use it almost anywhere when you need a random word. Has saved me seconds here and there when I didn't need to think of a word because I have FOO :)