Release of PHP5.3,...finally. Great news, but what is this GOTO
(pdf download)
2009-08-18 07:09:21
Finally PHP5.3 has been released (it was way overdue). However, in the release notes there is GOTO functionality. Not the GOTO we remember from BASIC days with the use of line numbers; but with anchors, similar to html anchors and jumping up and down the page. We have managed so far without it, is it really needed? Some might say yes; and I would not argue too much - the danger here is it is open to abuse by bad, slap dash, sloppy developers (I will not mention any names) - imagine having a script with 20 or 30 GOTOs around the page, it would be impossible to follow!
After much debate with my fellow developers/collaborators around the world, I have come to the conclusion that, a bad developer will develop bad code with or without GOTO. Having this additional functionality GOTO is just another tool from PHP - I wish they spent more time adding more useful functionality like daemons or real multi-threading, but thats a another story.
Just to recap, bad developers will develop bad code no matter what. I just hope that they do not abuse the GOTO functionality - with great power comes great responsibility! All I can suggest is think about 6 months down the line when you need to fix a bug or make a feature enhancement, if it should take 1 hour to do but takes 1 week then something is wrong!!!
Personally, I will probably not use the GOTO facility and will advise my fellow collaborators to do the same.