Sponsored by Realtor.com
Top 5 most ridiculous properties sold for a single dollar view!
realtor.com - Looking for a deal on your next home? What if you could pay a dollar? What if it was a MLB stadium or a university?!?!?
181 Comments
- inactive, on 06/23/2009, -6/+206This is the best php manual ever!
- radicaldementia, on 06/23/2009, -3/+168Seriously guys, friends don't let friends unconditionally branch. Once you goto you can never return.
- stackDigg, on 06/23/2009, -1/+97Great, now I'm stuck in a digg comment loop. This is why we can't have nice things.
- shadowspawn, on 06/23/2009, -2/+72goto: firstComment
- nova912, on 06/23/2009, -5/+59Why would they add this... /sigh
- MWeather, on 06/23/2009, -4/+53<?php
a:
echo "Don't use ";
goto b;
b:
echo "goto! ";
goto a;
?> - Darkhacker, on 06/23/2009, -3/+52The harmfulness of goto is sometimes overrated. You can probably count the number of times you should ever use it on a single hand, but there are occasional moments where it is nifty. If used appropriately, it shouldn't create a tangled mess. The Linux kernel for example uses goto occasionally for various reasons.
Recommended reading: http://kerneltrap.org/node/553/2131 - radicaldementia, on 06/23/2009, -0/+49wait, how'd you even get past the goto to post a comment?
- pinguz, on 06/23/2009, -0/+46you say that a lot
actually on every single php manual - CookieOfFortune, on 06/23/2009, -0/+44He had to exploit a buffer overflow to branch out.
- seobro, on 06/23/2009, -2/+41YAHOO, the dreaded GOTO is here. Well, now we can program spaghetti code like Chef Boyardee®.
- Plurkman, on 06/23/2009, -1/+38Why add a procedural mechanism to a language that has clearly been moving (and rightfully so) towards OOP throughout the more recent versions? This looks like an open invitation to sloppy programming.
- TrevorBradley, on 06/23/2009, -2/+38Hah! These Onion articles catch me every time...
- Otto, on 06/23/2009, -0/+29Everybody should keep a shotgun around in case of raptors.
- BlackOculus, on 06/23/2009, -0/+28The next php manual will be even better!
- inactive, on 06/23/2009, -2/+29Dugg for consistency!
- lofilotek, on 06/23/2009, -5/+30PHP 5.3: Sup assembly?
Assembly: Sup PHP? - ctnp, on 06/23/2009, -1/+26Because the average PHP programmer doesn't care about OO design or good general programming flow.
<ducks> - SDeluxe, on 06/23/2009, -1/+25Plimpton mentioned before that he makes this post each time passive aggressively/sarcastically because, though he enjoys the occasional php manual, it's a bit ridiculous that they make it to the front page and receive so many diggs each time. Now Plimpton has become what he was once protesting, a source for large amounts of diggs based on the same generic post. Ironic. Meh, c'est la vie. Who will protest the protesters?
- ell0bo, on 06/23/2009, -0/+24yes, but in php I can't save my place in the memory stack to return from whence i came, unlike low-level programming. You NEED goto in assembly, you better not need it in PHP (you're doing it wrong).
- Entroper, on 06/23/2009, -2/+24Fail for not using the alt text.
- FattyMagee, on 06/23/2009, -3/+24If you did any low level C programming you would have realized how easy it is to make a much more logical and aesthetic code by avoiding unconditional branching all together
- zephc, on 06/23/2009, -1/+22Care for some more marinara sauce with your spaghetti code?
- CCB0x45, on 06/23/2009, -3/+24why would they do this?!?!?
I know I am gonna have to deal with gotos written by coworkers now. - ostracize, on 06/23/2009, -3/+24Imposter!
- nubnub, on 06/23/2009, -2/+21You forgot the loop
- surpher, on 06/23/2009, -1/+17Well... he learned a valuable lesson.
- sexybobo, on 06/23/2009, -1/+17i am looking at you.
- Raptor007, on 06/23/2009, -0/+16Your use of "goto a" is fine for an infinite loop, I guess, but wtf is "goto b" accomplishing??
- radicaldementia, on 06/23/2009, -0/+16Calm down it's just a joke. I've done quite a bit of low-level programming and I've seen when goto is useful, but you have to admit it's probably been abused way more then it's been used responsibly.
- Otto, on 06/23/2009, -0/+16Nothing is as bad as magic_quotes. Hell, <blink> is better than magic_quotes.
- localzuk, on 06/23/2009, -4/+19WTF?! What a step back for PHP.
- flashcat7777, on 06/23/2009, -0/+15Erhm... for(;;) echo "Don't use goto!";
Done. - kealper, on 06/23/2009, -0/+15that...is better left unsaid, but it did involve a pineapple, and some tweezers...
- MtheoryX, on 06/23/2009, -0/+15LOL.... yeah, the ***** site you're reading this on being one of them.
- bezz, on 06/23/2009, -3/+17This is almost a bad as magic_quotes
- StuartGibson, on 06/23/2009, -1/+15Oh come on, you can make crappy code in any language. PHP just makes it easier (and I say this as someone for whom PHP pays the mortgage).
- Bloodboiler, on 06/23/2009, -0/+14Giving PHP coders goto statement is like giving methanol to alcoholics.
They'll just abuse it. - BoneStamp, on 06/23/2009, -0/+14Awesome, I loved GOTO in BASIC. Maybe they'll force code to all caps too. /s
- inactive, on 06/23/2009, -3/+16More like Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! Don't use goto! ...
L2PHP. - majmcdonald, on 06/23/2009, -0/+12register_globals?
- bsmang, on 06/23/2009, -0/+11That is full of both fail and unfail at the same time.
- kinologik, on 06/23/2009, -1/+12The first time I goto was on a TRS-80. I was 12... Seeing my name looping infinitely in 16 random colors on my living room TV was almost a religious experience.
- alpha88, on 06/23/2009, -0/+10Yeah it's only used on approximately 20 million websites. Not too many people using it.
- whofarted, on 06/23/2009, -2/+11"Goto Considered Harmful": http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215. ...
"'Goto Considered Harmful' Considered Harmful": http://www.ecn.purdue.edu/ParaMount/papers/rubin87 ...
And finally,
Wait for it...
Wait for it...
"'Goto Considered Harmful Considered Harmful' Considered Harmful": http://www.ecn.purdue.edu/ParaMount/papers/acm_may ...
Yes! - trib4lmaniac, on 06/23/2009, -0/+8Dugg for dugg for consistency.
- AndyGasman, on 06/23/2009, -2/+10Programmers should keep a shotgun around in case one of their colleges uses GOTO.
Compiler warnings are better with lethal force for emphasis. - SkippyDoorknob, on 06/23/2009, -0/+810 PRINT "SYSTEM ERROR! EXPLOSION IMMINENT! ";
20 GOTO 10
RUN
*walk away from in-store demo machine nonchalantly...*
(this only work in the 80's) - merreborn, on 06/23/2009, -3/+11Long story short, "don't use goto" is a rule much like the rule "don't start a sentence with 'and' or 'but'".
That is, we have these rules for the inexperienced who have enough trouble with basic syntax to begin with. However, the more experienced are capable of discerning when use of these uncommon constructs is actually desirable. - jax0047, on 06/23/2009, -3/+11i'm the biggest xkcd hater out there, but that was actually a funny one
-
Show 51 - 100 of 186 discussions



What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the