Link Details

Link 147337 thumbnail
User 287383 avatar

By phpimpact
via phpimpact.wordpress.com
Published: Jan 08 2009 / 18:47

The GOTO statement has just been added to the PHP language.
  • 10
  • 7
  • 1599
  • 648

Comments

Add your comment
User 310218 avatar

cbiggins replied ago:

2 votes Vote down Vote up Reply

I was expecting an article about GOTO, but it seems its an article about how useless GOTO is without any factual info about what it does and why its bad...

User 211736 avatar

drstankus replied ago:

-1 votes Vote down Vote up Reply

There are plenty of articles that you can find about why GOTO is bad. I mean, Dykstra's work is only 40+ years old now.

It would be even more stupid if this article were just rehashing that old chestnut.

User 338269 avatar

OtengiM replied ago:

-3 votes Vote down Vote up Reply

If work with PHP is a mess I cant imagine what will be working now with the new GOTO . Damn will be a huge crappy mess.

User 256617 avatar

dragmire replied ago:

0 votes Vote down Vote up Reply

Like clockwork, OtengiM shows up in a PHP thread again!

User 233461 avatar

antych replied ago:

2 votes Vote down Vote up Reply

You don't have to use just because it's there, anyway http://schlueters.de/blog/archives/94-Goto-your-Christmas-presents-with-PHP-5.3.html

User 287383 avatar

phpimpact replied ago:

0 votes Vote down Vote up Reply

Yes antyc, I'm not going to use it, but someone else is, and I'm going to end up maintaining that code.

I don't know you guys, but I never asked for a GOTO. Anyway, I think the PHP hackathons are getting a bit out of control. People are adding random stuff just for the fun of it.

User 256617 avatar

dragmire replied ago:

0 votes Vote down Vote up Reply

Try using it and THEN report back on what you want and don't want. Maybe try reading the discussion threads for why it was included in PHP as well.

This isn't your parents' GOTO.

User 287383 avatar

phpimpact replied ago:

0 votes Vote down Vote up Reply

It's not clear why it was added. What it is clear, is why it shouldn't be added. On one side you have Edsger Dijkstra telling you not to add it, on the other a programmer hacking php who doesn't give a damn.

User 233461 avatar

antych replied ago:

0 votes Vote down Vote up Reply

Don't you think that something might have changed over those 40 years?
I might not saying it's good decision, but nowadays we have different languages and different problems to solve, you shouldn't completely dismiss it just for sake of it. I'm sure there was some reason.
As far other people writing crap that you have to maintain. They already do that without GOTO, so it hardly matters.

User 287383 avatar

phpimpact replied ago:

0 votes Vote down Vote up Reply

Yes, good point.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.