Talk:Hello world program
| This is the talk page for discussing improvements to the Hello world program article. | |||
|---|---|---|---|
|
|
||
| Archives: 1 | |||
| WikiProject Computing | (Rated C-class) | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||
[edit] removed link
Removed a link to "rawbw.com," as WOT has rated it untrustworthy, and "containing adult content" 68.183.36.159 (talk) 23:16, 17 March 2010 (UTC)
[edit] can we add at least a c++ code to the wiki?
i feel the article is very naked with a proper c++ code, consider it is the most stable and widely used programming languege there is today.
#include <iostream.h>
int main ()
{
cout<<"Hello World.";
return 0;
}
—The preceding unsigned comment was added by O1001010 (talk • contribs).
- A wag might observe that we already have a perfectly-valid C++ program; it's the first one in the article ;-).
- Atlant 16:44, 24 April 2007 (UTC)
that will compile? hummm.
- By definition, any valid C program is a valid C++ program.
- Atlant 23:48, 24 April 2007 (UTC)
-
- No, that's not correct. C is not an exact subset of C++. The first (C) program in the article is not valid C++ code. In fact, it's not even valid C99 code. See Compatibility of C and C++ for more details.
- As far as adding a C++ example, I think it is far more appropriate to provide only historically significant source code for the first few "Hello, world" programs, and let the List of hello world programs article provide all the rest.
- — Loadmaster 23:10, 8 May 2007 (UTC)
- "the most stable[citation needed] and widely used {{Fact}} programming languege there is today[who?]."?--Exidor (talk) 11:11, 9 March 2008 (UTC)
Let me point out that the "C++" code above is not ISO standards compliant. It should say <iostream>, not <iostream.h>. Most university computer science departments today teach Java as their introductory language, rather than C or C++, anyway. Also, according to the TIOBE Programming Community Index, Java has long been the most popular programming language, with C in second place and C++ in third. --JHP (talk) 05:17, 8 July 2011 (UTC)
[edit] Well, at least..
if not the most prevalent, how about [one of] the most esoteric? Brainf*ck!
+++++[>>>++++++<<<-]>>>++<<<++++++ ++++[>++++++++++<-]>+++++++++<++++ +++[>>+++++++++++<<-]>>-----.+++++ <--------.+++++++..+++.>>>.<<<++++ ++++.--------.+++.------.--------.
Marcthepirate 18:20, 8 May 2007 (UTC)
-
- Again, see the List of hello world programs. Given the existence of that page it's probably more important to decide which specific examples to leave out of this one. —Preceding unsigned comment added by 202.27.216.35 (talk) 04:56, 9 December 2007 (UTC)
[edit] New tag for <source>code
I did not initially use this tag for the sample in B but someone has applied it pretending that the code is in C. If this is OK, then fine: otherwise could someone remove it? I'm not right now sufficiently clear that B is close enough to C for this to be valid. TIA HAND Phil | Talk 16:52, 15 May 2007 (UTC)
- You're correct; C's syntax is not the same as B's, and that program demonstrates a couple of the differences. I've reverted the <source> tags to <code> anyway (per my comments at Wikipedia talk:WikiProject Programming languages, which you [Phil] already know about). <code> has the additional benefit of graceful degradation; I've tagged the B code with <code lang="b">, which would produce a nasty error message if you tried it with <source>. --Quuxplusone 06:59, 18 May 2007 (UTC)
[edit] Could we have a separate article on Hello world on different languages?
Could we have a separate article on Hello world on different languages to write hello world code in every language on earth?
- I think that's more of a thing for wikibooks —Preceding unsigned comment added by 193.191.136.194 (talk) 13:21, 3 March 2011 (UTC)
[edit] should the LSL variation be mentioned?
in the virtual world Second Life when one creates a new script it is by default a variant of the hello world theme, instead of "hello world" it says "hello avatar". Should it be mentioned on this article?--TiagoTiago 21:57, 17 June 2007 (UTC)
[edit] Link to factorial?
I see lots of people implementing recursive factorial as their second program in a language they're learning. Maybe this page could link to factorial in the "see also" section?
[edit] Hello World BASIC
A BASIC program of Hello World is short, sweet, and shows one of the most simple if not the most simple Hello World Program.
Print "Hello World"
It is just as important as all of those other programming languages with the exception of C.
Super 4 Vegeta 22:30, 21 September 2007 (UTC)
[edit] Online Quiz
Can anyone explain what relevance this link (C Online Quiz) in the main page has to the subject?
[edit] = Fortran 90 =
program prb implicit none
! here is the execution part
write(*,*) 'Hello World'
read(*,*) !this forces the pressing of a key before a window is closed
end program prb —Preceding unsigned comment added by 149.169.24.250 (talk) 18:28, 1 February 2008 (UTC)
[edit] is the history acurate?
I was reading the instruction book for a trs-80 which ran on basic and i discovered that it also gave hello world as an example. if memory serves (this was a while ago) it said that the use of hello world had been part of a trdition started before BASIC! could someone find a way to check me on this and then if i'm right change the history. —Preceding unsigned comment added by 71.250.3.220 (talk) 21:24, 26 April 2008 (UTC)
[edit] External link removed
I removed the following external link:
- helloworld.googletoad.com The Hello World Collection with 360+ programming language
because it's a mere copy (and one that gives no credit to the original author) of the Hello World Collection at http://www.roesler-ac.de/wolfram/hello.htm which doesn't add any original content. wr 80.137.174.130 (talk) —Preceding comment was added at 21:43, 20 May 2008 (UTC)
- Update: Someone put in the same link again, probably in order to promote this copycat site (which has ads). I removed the link again. Seems like this person has been busy reverting attempts to remove the link to his site. Hundreds of people have contributed to the original Collection, and this guy copied it, removed all the credits and wants to promote it as if it was his original work, and possibly make money from it. The original site has all the credits, no ads, and (by now) more languages. wr 80.137.168.174 (talk) 20:13, 18 June 2008 (UTC)
- Another update: This seems to be turning into an undo war. Although his link has been removed several times, he always returns to put it back in. Anyone know how to stop this abuse? wr 80.137.168.125 (talk) 22:17, 4 July 2008 (UTC)
[edit] Pre-history of the phrase
I wonder where the phrase actually comes from. Perhaps from some movie, animated cartoon, or TV show? (They would be fitting words for a newly hatched chick, for instance.) If so, it may have been something that Kerighan (or some earlier programmer) watched; meaning that it could be from anywhere between the 1930's and the 1960's. Jorge Stolfi (talk) 03:20, 30 June 2008 (UTC)
[edit] and in GOL:
This is the GOL code for hello world:
outputmessage~ Hello World
- Check out http://www.roesler-ac.de/wolfram/hello.htm for a place to submit Hello World programs into a Collection. 92.192.120.33 (talk) 20:45, 20 January 2009 (UTC)
[edit] I reverted two of Andy Dingley's recent reversions
Two anons, one of them me and the other someone else, recently made constructive changes to this article that were reverted by User:Andy Dingley. I've reverted those changes. Because my changes (and the other anon's) were made in good faith, and I believe Andy's changes were also made in good faith, I'd like to explain why I've made the reversions. If disagreement remains we can discuss. I know there is an unfortunate tendency among some WP editors to feel like anon edits are not constructive and that reverting them doesn't require the same amount of thought or discussion. I hope that's not the case here. Anyway, moving on...
The "exposition on B" that Andy presumably added (which I then removed) is pasted below for clarity:
An exposition: the only fundamental data type in B is the machine word. On the Honeywell 6070, the machine that the particular version of B that was described ran on, this is 4 bytes long. The character constant correctly expresses this fact. There is no = in initializers in B.
I removed this blurb because it has nothing whatever to do with Hello World, the subject of this article, and instead serves only to explain how the B programming language works. In my original removal comment I noted that this material more properly belongs in article about B, and indeed, it is extensively treated there already. As we link to the B (programming language) article in the text, an interested reader can easily find a thorough treatment. Furthermore, I find the "An exposition:" clause to be stylistically inappropriate.
In general, the whole paragraph describes something that should be immediately obvious to any computer programmer (B is not so different from C that it isn't clear). For the non-programming audience, this article is already not particularly accessible, and Andy's paragraph is clearly not aimed at them anyway. "machine words", "bytes", "no = in initializers" wouldn't make sense to anyone who doesn't program already. It's basically just a detour. This article is not meant to introduce B to the masses.
Now, on to the other anon's change. He removed Lisp from the list of functional languages, because, well, Lisp is not a functional programming language. Not only do people from the staticly typed ML and Haskell worlds not consider Lisp to be a functional programming language, but Lispers themselves are constantly pointing out that Lisp is multi-paradigm. These days, when people say Lisp, they generally mean Common Lisp, which most certainly is not functional (the standard doesn't mandate TCO in implementations, programmers make pervasive use of imperative DSLs like LOOP, the fact that it's a lisp-2 makes first class manipulation of functions more cumbersome, etc).
If you want to keep a member of the Lisp-family in that list, then substitute Scheme for Lisp -- Scheme is a Lisp, but it is not understood to be the Lisp in the way that CL is.
This is important because Lisp is widely believed to be a functional language by programmers with no experience with either functional programming or Lisp. We should not propagate this misconception.
Thanks. 72.42.144.222 (talk) 17:23, 4 December 2008 (UTC)
- First of all, thanks for splashing my name all over the edit history comments and even the section header, whilst you prefer to hide behind an anon IP. Aren't we supposed to be discussing the edits, not the editor? Remember too that WP:AGF works both ways. I'd also point out that I've barely edited this article and didn't contribute either of these sections. Please don't presume that I'm an author with WP:OWN when you could have checked the logs first. You expect to be treated as a special case of an anon IP that's not a vandal (they're about as rare as a Pacific Northwest tree octopus), but you won't extend a similar courtesy to others.
-
- Firstly the B exposition. diff. Yes, it's ugly. So think of a better way to phrase it and edit it, rather than blindly deleting.
- B isn't C, especially when it comes to declaring literal strings. Whilst the phrasing of this isn't wonderful, the listing is confusing without it. Part of the value of "Hello World" historically was that you often had to work past crazy hindering syntax like this to get anything to work and that's why such a trivial program (in function) remained valuable, as its effort of implementation was anything but. Demonstrating the sheer cussedness of any coding in those days (Coral 66 took me 3 days to get HW working) adds value to the article for a modern reader who would otherwise barely credit why we bothered, or seemed so pleased when it worked.
-
- Secondly the removal of Lisp "a functional language". diff.
- Clearly if you read the context of the article Lisp (as the best known suitable example) ought to be included here and "functional language" is where the problem lies. ML or Haskell might even vanish too. This isn't a discourse on whether Lisp is or isn't functional (that's uninteresting anyway, as it depends on your precision when defining "Functional"). Besides which, I thought you didn't like discourses on language details... The reason why Lisp, functional languages and Haskell get mentioned at all is because they're "recursion friendly" languages (to coin a neologism) where the popular HW is a factorial rather than a println(). That's all we care about in this context, not definitions of "functional".
- I don't claim that this sentence is perfect. But deleting Lisp makes it worse. It removes the one vaguely well-recognised term of the four and leaves the reader floundering. People who have even heard of Haskell, or who are comfortable with the finer details of language taxonomy, are rarely going to be those needing to have Hello World explained to them. Andy Dingley (talk) 02:56, 5 December 2008 (UTC)
[edit] 99 Bottles of Beer (http://www.99-bottles-of-beer.net/)
- Should this be edited in for comparison to Hello World as a programming-language teaching tool?
KingAlanI (talk) 19:13, 26 December 2008 (UTC)
[edit] Capitalization Hello world vs Hello World
There is inconsistancy between the different versions of the subject of the article. Some are spelled with world capitalized and some not, for example. Is this difference meaningful and correct in some way or is it just inconsistancy? Is there an accepted capitalization scheme? If not is there a reason why in the generic we shouldn't just pick one and go with it (i.e. except when referring to actual specific outputs)?
Goodbye world.--24.29.234.89 (talk) 07:10, 2 March 2009 (UTC)
[edit] Grammatical inaccuracy
Few have noted the grammatical inaccuracy of the statement "Hello World". That it should, in fact, be "Hello, World" according to the vocative use of the comma. — Preceding unsigned comment added by Technome (talk • contribs) 15:30, 3 February 2011 (UTC)
[edit] History Incomplete
One should note that "Hello World" is a somewhat peculiar phrase to be used in a first program. Herein lies the fact that the article's history section doesn't go back very far and certainly not to the roots of the phrase. Where did it come from?
Indeed, in my computing classes back in the 1974, "Hello" alone was used; it was seen as an interesting personification of the computer -- making it talk back to you. This first program was usually augmented by adding one's own name to the end, e.g. "Hello Peter." My own later experience in teaching had my students doing the same thing, even in test examples for a book we published in the early 80's.
But going back prior to the 70's, "Hello World" was in common use by the amateur (Ham) radio community and had been since the advent of the first voice signals (as illustrated by Danny Gregory's book "Hello World: A Life in Ham Radio"). I haven't done the research to see if it was common before that among Morse users. If radio aficionados were the first, the probable reason is that, due to the wide range of radio signals, saying "Hello World" seemed appropriate. As well, and in that Thomas Edison is said to have coined common usage of "Hello" for telephones in 1877 (in contrast to A. G. Bell's suggestion of "Ahoy"), it may be unlikely that the two-word phrase appeared before that time.
205.143.140.239 (talk) 18:00, 13 January 2011 (UTC) Pete Sawyer
[edit] "Predates the World Wide Web" ?
I fail to understand why that phrase is there... It also predates the invention of graphene, the fall of the Berlin wall, the 1998 Soccer World Cup, and the 2004 olympics.
The fact that "World Wide Web" has the word "World" in it doesn't make it relevant for this article.
This article is about a very small program, originally written in B, famously published in C. Nothing to do with the web. — Preceding unsigned comment added by 190.245.100.11 (talk) 19:27, 13 October 2011 (UTC)
- It was a bad change. It relates more to GUIs than the web, and some supposed (but broadly irrelevant) distinction between programs limited to stdio and those with richer UIs. Andy Dingley (talk) 13:08, 14 October 2011 (UTC)