Ah, the good old Hello World application: the first step on the path to learning a new language. If you can get this one right, you know you're off to good start.
But did you know nearly all Hello World applications, simple as they are, contain a serious syntax error? The error is language independent, but at the same time, it depends entirely on the language. That is to say, the error can occur in any programming language, because the output language is English.
Luckily, we've got a function to fix it. Give it a try!
But did you know nearly all Hello World applications, simple as they are, contain a serious syntax error? The error is language independent, but at the same time, it depends entirely on the language. That is to say, the error can occur in any programming language, because the output language is English.
Luckily, we've got a function to fix it. Give it a try!
Hello World
In English, when address a group or an individual, the thing being addressed must be set apart from the rest of the sentence by a comma. So, if you're going to do things right, you've got to output "Hello, World", not "Hello World".
There are a number of ways we could solve this issue. Being quite a fan grammar and punctuation, I decided to take out some frustration in this function. First I strip out the affected area. Then I patch the text back up with proper punctuation.
Of course another, and arguably simpler, solution would be:
If this all seems a bit trivial to you, just remember that commas can save lives.
Let's eat grandma.