Talk:Goto

message: Can someone please explain the goto relation to object oriented programing specifically? It seems that it is a compromise between pro and con beliefs on using goto, but that is (my) layman's conjecture. Thanks!  — Preceding unsigned comment added by 71.99.3.105 (talk) 23:58, 30 June 2011 (UTC)
thread_title:  Help Here! 

message: Because of the current popularity of Java, would it be appropriate to discuss the labeled break and labeled continue statements in this article? It has always seemed to me that these constructs, though rarely used, are gotos with restrictions as to where you can "go to". --Eraticus 23:12, 16 April 2007 (UTC)
thread_title:  Java and Goto 

message: Does this belong here? Looks like a commercial promotion to me. Any other comments?
(Personal POV: I mean apart from the bizzare idea of porting Fortran to Java without rewriting it; this is a joke, right?; the idea that adding jumps to Java would help; the idea that you would actually have something bug free at the end of it; the amazing amount of effort and hacks to get this into Java; why not leave it in fortran? (End personal POV) 
peterl 03:59, 6 July 2007 (UTC)
thread_title:  The Complete Framework for Using Gotos in Java Programs 

message: The article is missing a section on GOTO in assembly language. In assembly (eg PIC ASM), there are no high-level constructs such as
for/if-then-else/break etc. There are only: Call/Return, Goto (=Jump) and Conditional Jump (eg the pic's skipz/skipnz). Things such as if-elseif-else are built out of conditional jumps: practically every flow-control structure in assembly is a Goto.  --RichardNeill 05:30, 24 July 2007 (UTC)
replies: text: Well, in assembly there is no distinction between goto and non-goto branching. This is a distinction that can only made in higher level languages that have alternatives to "goto". Why would we need to cover "goto in assembly"? It's not even referred to as goto in assembly language. - Rainwarrior 05:51, 24 July 2007 (UTC)
thread_title: Assembly

message: The criticism section had been marked with NPOV. But no explanation was given. The section is well referenced, and the fact that is is criticism doesn't make it POV. Please explain if you want to add that marker back in. peterl (talk) 04:19, 29 January 2008 (UTC)
replies: text: I don't think the NPOV tag was warranted either, but the writing was a bit awkward and did have a weasel word tag.  I've tried rewriting several of the sentences to try to make it better. - Dmeranda (talk) 09:44, 29 January 2008 (UTC)
thread_title:  NPOV mark on critcism section

message: An open-source licensed project called JavaGoto. Maybe it has some usefulness in teaching (what GOTO is and why not to use it).
https://github.com/footloosejava/JavaGoto  — Preceding unsigned comment added by 174.7.38.170 (talk) 04:22, 18 April 2014 (UTC)
thread_title:  A working GOTO for Java 

message: Since there seems to be much ado over GOTO vs GoTo, goto, gOTo, etc., it must be important, so I think there should be some mention of the COBOL form being two words.
Georget99 (talk) 20:14, 10 April 2009 (UTC)
replies: text: That's not the only occurrence of GO TO. Commodore BASIC accepts both forms: GOTO is tokenized as 0x89; GO TO is tokenized as 0xCB 0xA4. Both forms are interpreted in exactly the same way. Devil Master (talk) 20:41, 28 July 2009 (UTC)
thread_title:  It's GO TO in COBOL 

message: Goto should be described as an unconditional jump. A plain goto is not a branching statement. Only if goto is preceded by an if (or similar) it works in a conditional way. (or if it's a computed goto or any of the more exotic variants)  — Preceding unsigned comment added by 88.112.175.168 (talk) 08:05, 25 September 2011 (UTC)
replies: text: Sorry, but that's nonsense steeped in pedantry.  If you want to make a distinction between conditional branching and unconditional branching do so, but both forms of branching are still branching nonetheless.Tgm1024 (talk) 16:07, 28 July 2014 (UTC)
thread_title:  Unconditional 

message: Regarding the request for citations starting:
Some[which?] programming style coding standards prohibit...
Possible citations are
http://msdn.microsoft.com/en-US/library/b34dt9cd(v=VS.80).aspx
"It is good programming style to use the break, continue, and return statement in preference to goto whenever possible."
http://www.kernel.org/doc/Documentation/CodingStyle
"Chapter 7: Centralized exiting of functions
Albeit deprecated by some people, the equivalent of the goto statement is
used frequently by compilers..."
The python discussion about a Python goto is quite interesting
http://www.python.org/dev/peps/pep-3136/
"This PEP is not a proposal to add GOTO to Python. GOTO allows a programmer to jump to an arbitrary block or line of code, and generally makes control flow more difficult to follow."
It might be helpful to rephrase the sentence:
Some programming style coding standards discourage...
while some do not
ProgrammerMax (talk) 20:40, 6 April 2012 (UTC)
replies: text: If the only reason why "goto" should not be use, is that the program can not be checked : it's not a good reason : optimized code is necessarily hard to check. Code is not designed to be checked, but to be the fastest and the shortest : with the best reuse of instruction, and the less redundancy of tasks (such as done/undone/done/undone). Goto is simply necessary.  — Preceding unsigned comment added by 137.129.13.90 (talk) 16:18, 11 September 2012 (UTC)
thread_title:  Criticism and Decline 

message: Dijkstra claims that "goto considered harmful" was not the original title of his article. The title was changed by the editor, Niklaus Wirth.
Dijkstra tells the story in this video beginning at 4:22:
http://www.youtube.com/watch?v=40CNRVHLt7A&feature=player_detailpage&list=PL7D42CB0A207D79B6#t=255s
Prof. Edsger Dijkstra on "Structured Programming" at "Software Pioneers",sd&m Conference 2001, Bonn, Germany
I don't have time to transcribe the story now but it would be a good addition (and correction) to this article.
I haven't read the "considered harmful" paper in a while, but going by what Dijkstra says in the video, the paper is an analysis, not a criticism in the derogatory sense -- in which case the current wording of the wikipedia article is biased.
Ross bencina (talk) 05:38, 5 January 2013 (UTC)
thread_title:  Dijkstra didn't propose the title "goto considered harmful", it was Niklaus Wirth 

message: The section states that MISRA C Coding Standard prohibit the use of GOTO statements. This is not the case since MISRA2012:
* MISRA C:2004 Rule 14.4 (required): The goto statement shall not be used
* MISRA C:2012 Rule 15.1 (advisory): The goto statement should not be used
Simzer (talk) 15:33, 27 June 2013 (UTC)
thread_title:  Criticism and decline out of date statement 

message: Is Apples Security failure missing in the article? :) 87.78.122.110 (talk) 20:00, 23 February 2014 (UTC)
thread_title:  Apple 

message: "An empirical study of goto in C code" (2015 paper) https://peerj.com/preprints/826v1.pdf and https://peerj.com/preprints/826v1/ 
"We conclude that developers limit themselves to using goto appropriately in most cases, thus suggesting that goto does not appear to be harmful in practice."
• Sbmeirow • Talk • 21:51, 16 February 2015 (UTC)
thread_title:  "An empirical study of goto in C code" 

message: select case/etc are just computed goto - same use/results/speed. If they weren't the same programs would run really slow - half the assembly codes would be unsued.
2601:181:8000:D6D0:7855:5B43:1B2A:B0F4 (talk) 16:23, 5 May 2016 (UTC)
thread_title: Misc

message: Hello fellow Wikipedians,
I have just modified 2 external links on Goto. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Corrected formatting/usage for http://kerneltrap.org/node/553/2131
*Added archive https://web.archive.org/web/20160526142532/http://www.lahey.com/docs/lfprohelp/F95ARComputed_GOTOStmt.htm to http://www.lahey.com/docs/lfprohelp/F95ARComputed_GOTOStmt.htm
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 13:19, 23 March 2017 (UTC)
thread_title:  External links modified 

message: Hello fellow Wikipedians,
I have just modified one external link on Goto. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20100214095828/http://kerneltrap.org/node/553 to http://kerneltrap.org/node/553
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 16:04, 21 October 2017 (UTC)
thread_title:  External links modified 

message: The link to this doesn't work any longer:
Sexton, Alex. "The Summer of Goto | Official Home of Goto.js". Retrieved April 28, 2012.
Mikael4u (talk) 21:07, 17 April 2021 (UTC)
thread_title:  External Link Dead 

message: In APL there is no alternative to 'goto'-like branching, because it does not have instructions like if/else/switch. How about include a section about good branching techniques for such kind of programming languages? ~~  — Preceding unsigned comment added by 179.236.47.163 (talk) 23:07, 26 June 2018 (UTC)
thread_title:  APL 

message: The Wheeler jump was the prototype for a subroutine jump -- i.e., save current instruction counter somewhere such that it can be used for subroutine return -- and not for a simple goto.  The EDSAC already had 'goto' in the hardware: branch instructions E and G.  What Wheeler devised was the coding sequences for 'save position and branch to specified location' and 'branch to saved position'. This is tantamount to inventing the closed subroutine.
The IEEE citation unfortunately described this as the 'precursor to goto' rather than 'precursor to gosub', an error that ought to be obvious since it also says 'to allow a program to pass control to a subroutine'.  — Preceding unsigned comment added by 108.20.234.238 (talk) 21:37, 22 September 2018 (UTC)
replies: text: I agree. That description of the Wheeler jump is fairly obviously a mistake in the IEEE citation. I have made a first attempt at correcting this section. --Stephen lamppost (talk) 16:48, 4 February 2019 (UTC)
thread_title:  Wheeler jump = gosub, not goto 

message: The Bohm and Jacopini paper "Flow Diagrams, Turing Machines and Languages with Only Two Formation Rules", didn't claim, much less prove, "that the goto statement is not necessary to write programs"; the scope of the paper was limited to programs that could be expressed as flow charts. It did not cover programs with subroutines, much less goto statements that unwound the stack. 
Shmuel (Seymour J.) Metz Username:Chatul (talk) 16:13, 15 August 2019 (UTC)
thread_title:  Bohm and Jacopini didn't claim 

message: Article says "In Perl, there is a variant of the goto statement that is not a traditional GOTO statement at all. It takes a function name and transfers control by effectively substituting one function call for another (a tail call): the new function will not return to the GOTO, but instead to the place from which the original function was called."
This is absolutely a traditional GOTO; you can do exactly that with an ordinary jump instruction in machine code.
It's just not "traditional" in the narrow context of the history of a family of higher level languages that have always had a restricted form of GOTO.
Moreover, of course "the new function will not return to the GOTO"; GOTO isn't expected to return, unless it is GOSUB: a subroutine calling form of GOTO.
KazKylheku (talk) 19:38, 9 December 2020 (UTC)
thread_title:  Perl Goto 

message: “Many languages support the goto statement, and many do not”
I feel that this statement is so vague as to be pointless at best and confusing at worst. This is because it’s phrased as a quantitative comparison. 
I propose that we rephrase it to either include a good faith qualitative comparison of languages with support versus languages without support, or we use clearer wording such as, “there is now a considerable mix of languages support the goto statement in different methods.”
Any thoughts on this? ChiXiStigma (talk) 07:48, 5 August 2022 (UTC)
thread_title:  Vague wording in article summary