Talk:Hello world/Text

Revision as of 20:43, 1 November 2012 by Rdm (talk | contribs) (→‎Hello World)

Some examples lack some parts of the code. e.g. the Java example is not a complete program.

It's not uncommon for RC tasks to exclude code that represents the program surrounding the code. This helps make it obvious what code is specific to the task at hand. If you need to see what the surrounding code looks like, see Empty Program. --Short Circuit 02:31, 21 November 2008 (UTC)
Sometimes, it's necessary to show the complete program. For instance, say a task is to set a variable to 2.5 --- showing the statement J = 2.5 by itself in most languages would probably be wrong as (most?) languages would like/need/require some sort of declaration of the type of variable it is (and/or other attribute thingys), and that's the sticky wicket part. Just showing the assignment of the variable would do a disservice. I like to see what various languages need for a prologue.-- Gerard Schildberger 18:14, 11 August 2012 (UTC)

Hello World

I don't care to be cliché (Hence why I originally wrote the text as "Goodbye World"), but in light of confusion like this (and I've seen others mention it elsewhere), perhaps the task should be renamed to Hello World - text, and the relevant output strings adjusted? Similar would need to be said for the GUI task. Any objections? --Michael Mol 03:39, 20 January 2010 (UTC)

As for the name of the task, most people would know what a "Hello World!" program is, no matter what the actual output was shown, it's supposed to show how to program a very simple display of text, with a minimum of program/language preamble. -- Gerard Schildberger 18:28, 11 August 2012 (UTC)
However, the relevant output text string should be strictly adhered to as that's the task requirements. As in a real world example, the name of the game ... er, task, is to do what the requirement(s) specifiy, not what the name of the task is. If the task is to display a specific mixed uppercase/lowercase text with punctuation (and in this case, in direct contradiction to the task's name), then that's what's to be displayed/shown. We all know to shutdown a Microsoft Windows system, you have to click on Start first. --- And having wallpaper on a desktop, ... there're way too many examples of oxymoronic procedures/methods/names/requirements/etc. Many of the Rosetta Code program examples got this very simple task wrong, either by the wrong words, case, and/or punctuation. A few hit the trifecta. -- Gerard Schildberger 18:28, 11 August 2012 (UTC)
Should tasks be marked as incorrect if they don't meet the task's requirements? Simplistic as the task is, more than a handful of the examples managed to get it wrong. Or, should somebody just correct them? It's easy enough to do, as most of corrections would just be changing a literal. -- Gerard Schildberger 21:52, 23 October 2012 (UTC)
Both sound fine. But I would avoid "fixing" implementations for languages you are not familiar with (since some languages implement special characters in strings and assuming a special character would be treated literally would be bad -- granted, the chances of any of the characters here being special is low, but there's no point fixing something if you cannot know if your fix is correct). --Rdm 19:31, 24 October 2012 (UTC)
Understood. The point of verifying if an example will pass the "what-is-a-legal/special-character" was foremost on my mind. I know a few languages treat an exclamation point [!] as special. I hope flagging the various program examples won't be construed as picayune; the task is almost a definition of simplicity itself. -- Gerard Schildberger 19:21, 1 November 2012 (UTC)
Yes, it's difficult to not be silly when the task itself is somewhat silly. That said, note that some of your "incorrect" markers might not be completely accurate. Perhaps we should ask for example output? For example, I believe that $ is by convention a string terminator in 8086 assembly (like ascii nul character in C).

Audible Hello World?

I'd like to see a "Hello World/Audible" or "Hello World/Spoken" task here. The only task representing text-to-speech (which is common in accessibility aids and a large field) is "Using a speech engne to highlight words" - a draft task with one implementation (mine). That task would benefit from having a simpler text-to-speech task. I think it would be nice to have another Hello World as well. I know of 4 languages off the top of my head which I can write examples in. Thoughts? --Crazyfirex 03:06, 18 September 2011 (UTC)

There is an audible version: http://rosettacode.org/wiki/Speech_synthesis Markhobley 10:03, 18 September 2011 (UTC)
Return to "Hello world/Text" page.