Talk:Hello, world

Latest comment: 1 month ago by TarnishedPath in topic Requested move 4 April 2026

Do we really need examples of "Hello, World" in that many select languages?

edit

I can't tell if there is consensus around this, but I don't think we need to have examples of the Hello, World! program in that many languages. It appears that most other articles uses either C or C++ for examples. Shouldn't this article follow that convention? ThatIPEditor Talk · Contribs 17:48, 14 October 2022 (UTC)Reply

This has gone back and forth. See Wikipedia:Articles_for_deletion/List_of_Hello_world_program_examples and a pretty big number of threads in Talk:"Hello,_World!"_program/Archive_1. It used to have lots of examples, they were removed. And then in September 2021 the examples section was re-created and it's been growing since then: Special:Diff/1044294394. I don't have a super strong opinion other than I've removed some very non-notable ones and tried to keep to simplest possible style but I'd be open to a discussion about possibly removing the list or at least cutting it down in size. Skynxnex (talk) 18:39, 14 October 2022 (UTC)Reply
No, we do not need that many examples. It does not aide the reader’s understanding what a Hello, World program is. I have now artificially restricted the set of examples to programming languages with an ISO standard. I would even contest that we need any Examples section at all, because you can find all examples in the respective programming language’s Wikipedia article. There you can find explanations, too, which is missing here. Code without explanation/comments is bad. ‑‑ K (🗪|) 14:09, 14 November 2022 (UTC)Reply
@Kai Burghardt I've been trying to have time to think through what I think is the best rule/restriction of languages to have in the examples section. Thank you for trying something but I think that the ISO standard is too restrictive in a non-helpful way, partly since more recent languages are much less likely to have an ISO standard than earlier languages. Also noticing in my watch list, it definitely seems like it will forever be an on-going addition/revert/addition/revert from various different users. I don't have a solution for it now but I will try to propose a different rule for the set and maybe how to make it less inviting for people to add more. Although, for many new users of Wikipedia being able to add an example of their favorite language is, I'm sure, very tempting. Happy editing. Skynxnex (talk) 18:40, 1 December 2022 (UTC)Reply
@Skynxnex: I don’t think we need to cover recent programming languages. It’s perfectly fine that there is, for example, no Q# – a quantum-computing oriented language – example. The tenacity of ISO standards – the time it takes for drafting and approving a standard – is actually a pretty favorable characteristic. This will prevent us from unnecessarily documenting ephemeral programming languages like – I don’t know – TrumpScript.
   What if we restrict the set to programming languages listed in {{programming languages}}? However, it seems to be an alphabetical list clipped at the (now) 33rd item, and a brief look at the template’s revision history shows there’s been a back and forth, too. Arguably not the best source for limiting the set of examples.
   Another “creative”, yet poor idea for an encyclopedia is to wrap all examples as alternatives for {{random item}}. The page stays short, only one example is displayed [the reader can {{purge|request a new example}}], and everyone can still contribute their favorite programming language’s example.
   I think, I’ll keep it the way it is now unless you or ThatIPEditor have some brilliant suggestion. If things get too stupid for me (constant re-addition of some programming language), I’ll replace the entire section with a link to Wikibooks: Computer Programming/Hello world (there’s already a link to that at the bottom).
‑‑ K (🗪|) 21:04, 1 December 2022 (UTC)Reply
To be honest, I think it is a good and valid idea to replace the entire section, and all sections with examples in random languages with a link to wikibooks. There are practically infinite languages out there, and it is very... improper to have a huge list of examples. ThatIPEditor Talk · Contribs 03:00, 4 January 2023 (UTC)Reply
The list of examples are quite literally longer than the rest of the article. ThatIPEditor Talk · Contribs 03:01, 4 January 2023 (UTC)Reply
@Skynxnex, ThatIPEditor, and Andy Dingley: Another alternative idea: How about strict enforcement of the cite reliable sources policy? Currently almost all examples lack a source. I have observed several micro-edits because “some” version was supposedly “better”. If we say there have to be sources corroborating that certain code is “the” HW in the respective language, there would be less ambiguity.
My problem with that approach, however, is, well, I’ve browsed a couple (printed and published ≈ reliable) programming language teaching books and they do not include a HW (but maybe there are suitable sources anyway). Also I can anticipate that eventually this approach will bloat the Examples section again, since it does not perform a selection on eligible programming languages. Comments? ‑‑ K (🗪|) 09:30, 1 September 2023 (UTC)Reply
Sourcing is not the issue here. Andy Dingley (talk) 10:18, 1 September 2023 (UTC)Reply
Thanks for the ping. I guess your proposal is kind related to apply the concept of WP:DUEWEIGHT? I'm not sure how it'd workout, exactly, and we'd probably end up with a lot languages that are conceptually pretty similar, so I'm not sure it'd be an improvement. I think, in general, similar to plot descriptions, we don't require reliable sourcing but I think if there is a disagreement about how to micro-style some example, including sourcing in those cases could help resolve it. Skynxnex (talk) 16:14, 1 September 2023 (UTC)Reply
@Andy Dingley: Well, enforcing a reliable sources requirement will exclude programming languages that have not gained a significant user base, like, I do not know TrumpScript, because no reliable sources have been created. Most are self-published, blogs, etc., something you cannot write an encyclopedic article with.
I’m afraid a central “List of HWs” article will eventually suffer from WP:EXPENSIVE. The German WP has adopted that approach. They have not reached the limit (yet), but over at RC their HW article has that problem.
@Skynxnex and Andy Dingley: I have replaced § Examples with a list of links to Wikipedia articles now. This is meant to serve as a “deterrent.” As above my main argument is that unexplained code is bad, so explanations must be added, but this is already done by the respective programming languages’ articles (see above for an earlier comment of mine). The list is pretty long, though (maybe wrap in {{hidden}}?). Do you think this is better? ‑‑ K (🗪|) 20:40, 6 September 2023 (UTC)Reply
  • This is probably worse now than it was. All of the supposed constraints for inclusion put forward recently seem irrelevant. In particular, this new list just looks like a justification for "Please throw yet more examples at this page".
This page needs simple criteria for inclusion: Does it make this page better?
Not "Is this langauge meeting some external test, such as an ISO standard?" Not "Is there a HW example already available on a linked page?". Certainly not, "Have I just learned this language in class?"
So in terms of benefit to this article, that should be in terms of factors such as:
  • Historical relevance (so B & K&R C are in)
  • Demonstrating some aspect of why HW was considered a useful attainment. So Assembler (almost any, but maybe 8086 so that a BIOS call is fairly simple) is in. CORAL 66 would be ideal too, if anyone still has one, or something equally gruesome from PL/1 or that era. An early FORTRAN (when Hollerith work was still onerous) would be good. COBOL definitely.
  • Some short list of examples to demonstrate evolution of general purpose languages. So some, maybe all from C dialects and derivatives, showing functional calls through to streamed output.
  • Anything obscurely weird. Common Lisp? XSLT?
But the point is that they should be chosen on their value to this article and the concept of Hello World as a pattern, and as an engineering struggle to achieve (which is now largely hidden by modern languages making the trivial actually trivial to achieve). Andy Dingley (talk) 01:31, 8 September 2023 (UTC)Reply
@Andy Dingley: Well, let’s consider this a trial. So far nobody has inserted new Hello World source code. I claim this is due to the link list. However, we need to take into account the (auto‑)confirmed edit protection until May 23, so some “spam” is probably technically prevented. ‑‑ K (🗪|) 10:21, 14 October 2023 (UTC)Reply
I've said it before and I'll say it now (Andy and I have had this debate in the past): while it's conceivable that having some examples of Hello World programs could make the article better, in practice having any examples apart from the B/C examples always devolves into an absolute mess. This is a recurring theme. A very strict editorial line has been the only thing that has kept this article maintainable over the years, but unfortunately it seems that every five years or so we need to relearn this lesson. The github EL linked in this very article is extremely comprehensive, and github (and sites like it) are ideally suited to hosting code. The list of links compromise here is a good idea, but even with just links, the list is already bigger than the rest of the article. My !vote is always: no source code in Wiki articles, and especially not in this article. And I'd extend that to the link compromise. The truth is, when you have no examples, it's much easier to justify saying no to the first one. When there are many, it's a constant battle. Eniagrom (talk) 07:17, 2 November 2023 (UTC)Reply

2026 "reactivation" of discussion

edit

I've just removed a lot of examples that don't actually mention "hello, world"; and I've fixed others that do mention it, but where the article itself has since been edited such that our wikilink pointed to the wrong section. I've also removed one programming language for which the article no longer exists (edit diff). This problem is bound to reappear as the linked articles continue to be edited. I think this list is impossible to maintain in its current form. I hope to "reactivate" the discussion about how to proceed with it.

Wikipedia's guidelines about notability are another issue: The fact that "hello, world" programs appear in other Wikipedia articles is not notable by default, so we need a reliable external source for every entry in this list. Someone outside of Wikipedia needs to have said that the Wikipedia article about language XYZ has a "hello, world" program in it, and that someone needs to be considered a reliable source for it to establish notability. (Note: Whether it is factual or not doesn't matter, the source is needed to establish notability.) If we don't follow this rule then we encourage people to include "hello, world" programs in articles where they may not belong, just so that their article can be linked here. Renerpho (talk) 21:57, 4 April 2026 (UTC)Reply

Routine calculations, per WP:CALC, do not require sourcing (let alone our definition of reliable sources). Anyone can easily compile and/or run example code on our articles and see if it prints "hello, world". Effectively every programming language has a "hello, world" program per WP:BLUESKY.
Individual list items inside an article do not need to be "notable" in the sense Wikipedia normally means. Many articles have (well guideline-support) lists of non-notable things but are still are WP:DUE for inclusion. That and WP:NPOV, and other related guidelines and essays. The consensus earlier was to not include examples other than the ur-examples and instead link to examples that were due for inclusion in notable articles. That does require maintenance, but all lists do. I'll try to be more mindful of it since I didn't realize so many language articles had removed their helloe world examples.
If a "hello, world" example isn't due in a target from here, then remove it and remove the link from here.
If you want a larger example if we want no examples other than the original BCPL and C, that's a different discussion but bringing up reliable sources isn't really relevant in that case (WP:DUE, however, is).
At least, that's my impression. I think it's generally encyclopedic to link to more examples and diffusing the work to the individual articles was at least a decent compromise. Skynxnex (talk) 01:57, 5 April 2026 (UTC)Reply

Requested move 4 April 2026

edit
The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: moved. There is clear consensus for a move to Hello, world. (closed by non-admin page mover) TarnishedPathtalk 01:08, 19 April 2026 (UTC)Reply


"Hello, World!" program"Hello, world" program – or "Hello, world!" program. The canonical examples are from Brian Kernighan. Versions from him in 1972, 1974 and 1978 are discussed specifically. None of those capitalize "world". This is a type of program, not the title of some specific program, so we should not prefer TITLECAPS. Wikipedia's convention is to prefer lowercase (WP:SENTENCECASE) unless necessary by prevailing convention. The World article uses lowercase for "world" (unlike the Wikipedia convention for Earth). Two out of three of Kernighan's examples do not include an exclamation mark. The best known of his examples is the one in the famous 1978 book, and it does not use an exclamation mark. Wikipedia should generally prefer the simpler form that does not include an exclamation mark. I was skeptical about the comma, but all three of Kernighan's variations include it. —⁠ ⁠BarrelProof (talk) 20:42, 4 April 2026 (UTC)  Relisting. {{GearsDatapacks|talk|contribs}} 21:21, 11 April 2026 (UTC)Reply

Relisted to generate a more thorough discussion and clearer consensus.
Relisting comment: Consensus for some kind of move, but another option has been proposed so relisting for consensus on which alternative title
Please add new comments below this notice. Thanks, {{GearsDatapacks|talk|contribs}} 21:21, 11 April 2026 (UTC)Reply
Move to Hello, world. That title is not ambiguous, and is the original form of the program's output. —gabldotink [ talk | contribs | global account ] 22:39, 14 April 2026 (UTC)Reply
Move to Hello, world. Ticks all the five WP:CRITERIA and a quick look at the google search results yields that it is more than enough recognizable. Squawk7700 (talk) 23:46, 18 April 2026 (UTC)Reply
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.