Goto is so bad in computer programming it ... (1 Viewer)

Feb 27, 2011
14,778
76,366
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
An xkcd cartoon is in the official docs for the goto command for PHP.

1649950412406.png



Sorry probably won't mean much to many, but I found it hilarious and I know there are quite a few programmers on this forum.
 
Jul 27, 2018
13
9
Failsworth
Funster No
55,166
MH
A class
Exp
Since 2018
nothing wrong with GOTO šŸ˜

10 PRINT ā€œHello World ā€œ;
20 GOTO 10

Subscribers  do not see these advertisements

 
Jan 19, 2014
9,400
24,807
Derbyshire
Funster No
29,757
MH
Elddis Accordo 105
Exp
since 2014
I did a tiny bit of c+ programming and after a few hours I wondered where "goto" had err gone to. I googled it and read it was not good practice any more. Can't remember why. šŸ¤” Anyway, my interest in c+ only lasted a few days šŸ˜œ
 

ROCHESB

Free Member
Mar 18, 2022
112
211
Funster No
87,516
MH
Itineo SB740
Exp
SInce 2002
I got out of commercial programming (PL/I) when structured programming became de rigeur. As an MVS Systems Programmer using Assembler you could just use Branch instead of goto ....
 
Jul 4, 2018
1,229
1,613
Bristol
Funster No
54,738
MH
Weinsberg
Exp
A few years.
Back in my COBOL days, press compile have a cup of tea feet up until the list of errors came back.
 
Sep 24, 2013
1,318
753
Norwich
Funster No
28,255
MH
Carthago A class
Exp
Since 2014
Nassi scheidermann charts sorted the ā€œgo to ā€œ out.
 
Apr 27, 2018
138
216
Derbyshire
Funster No
53,611
MH
WildAx Solaris XL
Exp
Since 2019
Ah, the good old days:

1. Write Fortran code onto coding sheets and submit to typing pool.
2. Get 80 column cards back and hand in deck to run control.
3. Job runs on ICL 1904S* main frame running 'George' operating system with 64Kb of core memory.
4. Job fails due to spelling/typing mistake on coding sheet.
5. Correct error on coding sheet and start again at step 1.

Subscribers  do not see these advertisements

 
Apr 27, 2016
6,889
8,028
Manchester
Funster No
42,762
MH
A class Hymer
Exp
Since the 80s
The bad thing about using GOTOs is you could end up in an endless loop. That was then, but nowadays most programs are endless loops. They jump out of the loop when an event occurs (mouse click, button press, time expired), perform a function, then drop back into the endless loop.
 
Oct 6, 2021
565
910
Funster No
84,698
MH
PVC
Ah, the good old days:

1. Write Fortran code onto coding sheets and submit to typing pool.
2. Get 80 column cards back and hand in deck to run control.
3. Job runs on ICL 1904S* main frame running 'George' operating system with 64Kb of core memory.
4. Job fails due to spelling/typing mistake on coding sheet.
5. Correct error on coding sheet and start again at step 1.
:LOL: I missed the final "Finish" on a Fortran program and it read the next program too. As a result I got an error printout 6" thick back, all of it totally useless. The joys of Fortran... or otherwise.
 
May 3, 2021
78
158
Funster No
80,868
MH
AutoTrail F70
cannot believe ive never spotted that in php. no intention of using it but ā€¦. 1980ā€™s calling.
 
Oct 25, 2016
5,587
31,665
Hartford Cheshire
Funster No
73,061
MH
Bailey Autograph 79-
Exp
Lots but slow learner.
Correct, some it's well over their heads, me included. May have well been written in Chinese. And the thing is i don't want to know.
 
Apr 27, 2008
11,851
14,093
Eastbourne East Sussex
Funster No
2,327
MH
Hymer low profile
Exp
Since 1972
I seem to remember that goto was about the only available loop structure in the original Sinclair BASIC. With IF to break out of the loop.

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,778
76,366
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
cannot believe ive never spotted that in php. no intention of using it but ā€¦. 1980ā€™s calling.
I didn't even think to look to see if PHP had a goto statement. I have been using PHP heavily since 1998 and never noticed.
It was added to V5.3 in 2009. WHY????
 
OP
OP
Gromett
Feb 27, 2011
14,778
76,366
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Oh and the big problem with GOTO for me is that if you goto something outside of the current stack frame without adjusting the stack the next RETURN will return to the wrong location and that bug would be extremely hard to track.
 
Jul 14, 2019
385
547
UK
Funster No
62,410
MH
Hymer MLT 570
Exp
Our 1st Motorhome
This thread reminds me of the late 70's when we used to go on our family summer holidays in our VW camper van to Port Grimaud. Dad used to pack his box of programming manuals first and we had to somehow find space for our things around it. We used to spend our days on the beach and Dad would be studying the manuals! šŸ˜Š
 
Apr 27, 2016
6,889
8,028
Manchester
Funster No
42,762
MH
A class Hymer
Exp
Since the 80s
Why do computer languages have such odd names like ANTHRAX or BOSTIK etc.?
The nice answer is that they were inventing things that had never been done before, so the names are bound to be a bit strange. If you think those are bad, you should see some of the modern mathematics stuff. The other answer is that they were invented by sad programming geeks, so what did you expect?

BASIC = Beginner's All-purpose Symbolic Instruction Code
ALGOL = ALGOrithmic Language
COBOL = COmputer Business-Oriented Language
C = the useful language developed from A and B.
C++ = A step improvement on C

ADA is named after Ada Lovelace, one of the first programmers, and PASCAL is named after Blaise Pascal, the French mathematician and philosopher.

JAVA was named after a type of coffee

Subscribers  do not see these advertisements

 
Last edited:
OP
OP
Gromett
Feb 27, 2011
14,778
76,366
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
The nice answer is that they were inventing things that had never been done before, so the names are bound to be a bit strange. If you think those are bad, you should see some of the modern mathematics stuff. The other answer is that they were invented by sad programming geeks, so what did you expect?

BASIC = Beginner's All-purpose Instruction Code
ALGOL = Algorithmic Language
COBOL = Computer Business-Oriented Language
C = the useful language developed from A and B.
C++ = A step improvement on C

ADA is named after Ada Lovelace, one of the first programmers, and PASCAL is named after Blaise Pascal, the French mathematician and philosopher.

JAVA was named after a type of coffee

Don't call JAVA a programming language... It is an abomination :mad::LOL:
 

Join us or log in to post a reply.

To join in you must be a member of MotorhomeFun

Join MotorhomeFun

Join us, it quick and easy!

Log in

Already a member? Log in here.

Latest journal entries

Funsters who are viewing this thread

Back
Top