The sky is falling, the sky is falling!!
Moderator: General Moderators
The sky is falling, the sky is falling!!
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: The sky is falling, the sky is falling!!
Is this new?
I have not used goto in about 10 years and I am glad!
I have not used goto in about 10 years and I am glad!
Re: The sky is falling, the sky is falling!!
Gotos are stupid.
They confuse the <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> out of people trying to understand others' code.
They confuse the <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> out of people trying to understand others' code.
Re: The sky is falling, the sky is falling!!
Actually it was just enabled in PHP 5.3, which was released at the end of June. I wouldn't say it's old news.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: The sky is falling, the sky is falling!!
GOTO;s are just another language tool, abusing them, like anything, will result in bad code, GOTO are exceptionally bad because of the never ending jumping that occurs, but still, then can be handy in very limited situations.
They are an experienced programmers tool...
Someone should build a language with every bell and whistle but only publically document like the smellest subset of the language to make it useful, then invite only those who pass a test, something of a programmers version of the stone cutters or whatever those people were on the simpsons -- secret cult thing -- shriners maybe?
They are an experienced programmers tool...
Someone should build a language with every bell and whistle but only publically document like the smellest subset of the language to make it useful, then invite only those who pass a test, something of a programmers version of the stone cutters or whatever those people were on the simpsons -- secret cult thing -- shriners maybe?
Re: The sky is falling, the sky is falling!!
The GOTOs in PHP aren't full-fledged, program jumping messes. You can only GOTO a label inside the same function - so it's not too bad.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: The sky is falling, the sky is falling!!
True...but I have never, ever needed to use one. Surely a logical if, else statement would achieve the same thing, and would actually be possible to understand without searching the file for various labels and whatnot.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: The sky is falling, the sky is falling!!
Now where did that obfuscated code challenge thread go...
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: The sky is falling, the sky is falling!!
i seen that in the link...The GOTOs in PHP aren't full-fledged, program jumping messes. You can only GOTO a label inside the same function - so it's not too bad.
Re: The sky is falling, the sky is falling!!
Does anyone have any links to the arguments presented for and against adding this and the discussion that followed?
Re: The sky is falling, the sky is falling!!
Thanks pytrin. I meant between the developers of PHP.pytrin wrote:viewtopic.php?f=6&t=93088
Re: The sky is falling, the sky is falling!!
I guess it dates back to 2005, when labeled breaks were discussed. I guess you can start with this message: http://marc.info/?l=php-internals&m=113280846017379&w=2 and follow the thread. Be sure to search maillist archive for 'goto' as well, there were several threads about it.