This isn't really a question I just noticed on the php manual under control structures that they are going to be using goto. I don't know how old any one is in this forum, but when I saw that it brought me back to the days of when a cd-burner was a tape drive and if you wanted a floppy drive you were talking some decent cash, Internet was BBS, if you could afford the telephone bill, I couldn't even afford the modem. On my tandy trs-80 programming was pretty BASIC. I was only 9 so programming was very basic, well still is. Buying games on tape was not unheard of. Not much in the php manual about this but hopefully it will not process the whole script and just process what is needed. Now I feel old. :icon_cheesygrin:
Dsiembab 5 Junior Poster
Recommended Answers
Jump to PostThe problem with that almostbob is that if you have a switch-case with 1000 lines of code you're a horrible programmer to which the "goto" is only the stamp on your forehead to label(no pun intended) you as such.
Jump to Postview source of 'professionally' designed scripts
bloat's the least of the problems
bad practice is about the only reason for a retrograde step.
I noted a use, not my use, personal attacks are unnecessaryI wasn't attacking you, I was just saying that if someone uses a switch-case like that …
Jump to Postyeah that's right I code like chef boyRD
Goto statements lead to spaghetti code. Very quickly.
Jump to PostFor this thread I hope a useful application for GOTO has become clear.
Yes, one use came to mind immediately. It is great for making messy code! The knowledge that it is a poor practice has been know widespread for decades. So why is your case is an exception?
All 15 Replies
darkagn 315 Veteran Poster Featured Poster
almostbob 866 Retired: passive income ROCKS
ShawnCplus 456 Code Monkey Team Colleague
almostbob 866 Retired: passive income ROCKS
ShawnCplus 456 Code Monkey Team Colleague
ed42 0 Newbie Poster
Dsiembab 5 Junior Poster
ed42 0 Newbie Poster
death_oclock 103 Posting Whiz
ed42 0 Newbie Poster
cwarn23 387 Occupation: Genius Team Colleague Featured Poster
ed42 0 Newbie Poster
cwarn23 387 Occupation: Genius Team Colleague Featured Poster
ed42 0 Newbie Poster
death_oclock 103 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.