The sky is falling, the sky is falling!!
Moderator: General Moderators
Re: The sky is falling, the sky is falling!!
I'm baffled as to why anyone thinks this is a step forward.
Re: The sky is falling, the sky is falling!!
I truly don't understand why this was added either. From what I have read it seems like a majority were against it, didn't see a real need for it, but added it anyway. goto leads to read only code. Suitable replacements have been added to most languages rendering it outdated and unneeded. (try/catch, switch, while, do while, even functions).
The only real reason I see to add this to PHP is to increase the distance between poor code and high quality code, making them easier to differentiate.
The only real reason I see to add this to PHP is to increase the distance between poor code and high quality code, making them easier to differentiate.
Re: The sky is falling, the sky is falling!!
Sheesh. I remember when it was impossible to write a program without goto. In fact when assembly was the only language and compilers were almost non-existant, I used to wear out the dissassembler hot key for following JMP $XXXX commands. Now to think that such a basic machine instruction is so completely hidden in the depths of the box to where it is considered poor programming. What a world.
Now there are structures, classes, objects, overloading and strange lingo I barely recognize as English. Now give me a goto and I know exactly what it is doing.
Nevermind the last time I used something even close to a goto (JMP in assembly) was writing microcontroller code without a compiler about 15 years ago.
Now there are structures, classes, objects, overloading and strange lingo I barely recognize as English. Now give me a goto and I know exactly what it is doing.
Nevermind the last time I used something even close to a goto (JMP in assembly) was writing microcontroller code without a compiler about 15 years ago.
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: The sky is falling, the sky is falling!!
Glad I am switching to Ruby & Ruby on Rails
, even after all this time!
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: The sky is falling, the sky is falling!!
Oh boy am I glad I am young enough to never have encountered a goto statementEric! wrote:Sheesh. I remember when it was impossible to write a program without goto. In fact when assembly was the only language and compilers were almost non-existant, I used to wear out the dissassembler hot key for following JMP $XXXX commands. Now to think that such a basic machine instruction is so completely hidden in the depths of the box to where it is considered poor programming. What a world.
Now there are structures, classes, objects, overloading and strange lingo I barely recognize as English. Now give me a goto and I know exactly what it is doing.
Nevermind the last time I used something even close to a goto (JMP in assembly) was writing microcontroller code without a compiler about 15 years ago.
- 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!!
I've programmed in Assembly before too, that's the only time I've used a jump or goto.
They have included goto's just as an extra feature to give programmers more freedom. If you don't like it, don't use it. If you have to modify code which uses it - then tough!
They have included goto's just as an extra feature to give programmers more freedom. If you don't like it, don't use it. If you have to modify code which uses it - then tough!
Re: The sky is falling, the sky is falling!!
GOTO isn't the end of the world, but I don't know why anyone would use it anymore. It would be interesting to hear from the people who lobbied to get it put into PHP.
Just be glad they didn't bring back the precursor to functions: GOSUB
Just be glad they didn't bring back the precursor to functions: GOSUB
Re: The sky is falling, the sky is falling!!
I'd advise anyone who did not read original Dijkstra paper to read this annotated variant: http://david.tribble.com/text/goto.html
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: The sky is falling, the sky is falling!!
Is it so difficult to do...
...?
I remember goto statements, just not the language I learned (and forgot) in high school.
Was there any real point to adding it? I mean this seems beyond a waste of time...the last thing I'd want to do is worry about pushing code down lines simply because it'll break a goto statement.
Code: Select all
<?php if (arg) {ex_this_function();}?>I remember goto statements, just not the language I learned (and forgot) in high school.
Was there any real point to adding it? I mean this seems beyond a waste of time...the last thing I'd want to do is worry about pushing code down lines simply because it'll break a goto statement.
Re: The sky is falling, the sky is falling!!
Shows that you didn't take your time to even read the docs. PHP has labeled goto, so pushing code down is not a problem.JAB Creations wrote:the last thing I'd want to do is worry about pushing code down lines simply because it'll break a goto statement.
Re: The sky is falling, the sky is falling!!
Would much rather have [proper] lambda. And Jab, no. I would rather use objects to control my execution thru composition
I'm sure some people would rather use the goto too.
Re: The sky is falling, the sky is falling!!
I want to see a framework written with nothing but goto statements and no decomposition.
Re: The sky is falling, the sky is falling!!
Anyone see the link to xkcd? http://xkcd.com/292/
and when you say a framework "written with nothing but" I am confused ( because I was going to write an absurdly basic framework in the simplest form of the word to humor you
).... but, am I allowed to use other constructs, like echo? A program isnt much of a program as much as it is an infinite loop or immediately terminating script if it can't do anything but control flow, there has to be some other constructs used like inputs & outputs, surely goto could be used within a method of a class, would that qualify? 
and when you say a framework "written with nothing but" I am confused ( because I was going to write an absurdly basic framework in the simplest form of the word to humor you
Re: The sky is falling, the sky is falling!!
By 'proper' you mean catching variables in the current scope into a closure without having to declare the list of variables explicitly?josh wrote:Would much rather have [proper] lambda.
Re: The sky is falling, the sky is falling!!
Ha, how about anything goes except user defined functions, classes, switches, while, do while, for and foreach loops.josh wrote:and when you say a framework "written with nothing but"