Hi there. I'm one of the many readers of the list but not contributing myself since I've no knowledge of the internals of PHP. However I'd like to make the following comments about 'goto', addressed to people opposing its introduction in PHP:
- If you consider the 'good way of writing code', whatever the language used, you often prefer to exit a function at the end of it, rather than having 'return's everywhere. Goto allows that for error processing as it was demonstrated by various examples in this ML. Sure you can always do the same with switch/case or if/then/else. But at that point you'll trade something easy to understand for some sort of orthodox-programming-by-the-rule harder to understand by someone maintaining the code later. My point here is that the design of a program is good or bad, with or without goto's and the people here can't decide that. - I do not understand the religious mission about having novice users oriented to what you think are the best programming rules. I've seen horrible PHP code without goto's and I've seen very nice C code with some goto's in it. If a programmer is a newbie, there are chances that his/her code won't be excellent, with or without goto's. The novice will be an experienced programmer when he/she will understand by him/herself why use or not use such or such design for a particular problem, and goto's are just a detail among many others. Again, you'll will have very little impact on programs quality by introducing or rejecting goto. You'll just make the situation harder for someone that wants it to get a better design, the exact opposite of what you want! - We are 20 years later than the time when BASIC was nearly the only language of easy access to non-programmers. The Grand Old Goto Fear may be dropped, no? - IMHO goto's ease the production of computer generated code. - IMHO The CLI interface will be used more and more. For instance I've dropped SH for scripts here, I want all script code written in PHP. Why? Because it is now easy to find people that knows PHP well, because they wrote code for applications running under Apache and PHP, so there is less for them to discover when moving to Linux programming, they keep the same programming language. And PHP CLI needs all the stuff you find in C or SH, including goto. In my opinion, add goto to PHP and let people figure themselves if they need to use it or not. My two cents bikeshed. Bernard -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php