At 18:28 07/06/2005, Jason Garber wrote:
Hello,
I don't know if chiming in at this point has any merit, but here is
what I see.
We have many, many people in favor of goto and ifsetor. They see
much legit use for those constructs.
Then, we have others who say that it will result in spaghetti code.
This is a completely invalid point because we have all seen
spaghetti code in PHP already. Spaghetti code comes from an
inexperienced or sloppy developer, not from cool language features.
Not true, IMHO.
Obscure constructs encourage obscure code. One of the key success factors
of PHP, even though it's very difficult to quantify and define, is the
simple syntax and minimal obscurity, that resulted in ease of
use. Unnecessary constructs are not only bloat, but they can do more
damage than good. And the fact we may have made mistakes in the past and
have unnecessary constructs already, doesn't mean we should do it again.
ifsetor is obscure, and 100.0% redundant. I can't think of a single reason
to add it except for the fact that we invested so much time in discussing
it and it would feel odd to have that end with that. That's not a good
reason however, so I'm very much against it. Performance is no good reason
either - we can't go around implementing every common piece of code in C
because it's too slow in PHP code.
goto is perhaps less obscure, but in my opinion, can bring more bad than
good. The only real example of using goto extensively that I recall people
bringing up here is scanners/parsers. Not the right language for that,
guys. We shouldn't really take into account parser/scanner use cases when
we come to decide about features for PHP, it's such a negligible portion of
PHP's usage that it just doesn't make sense spending time on that. I'm
also -1 on this feature, although I don't think it's nearly as bad as
ifsetor, because it's not obscure and it's not 100.0% redundant.
Bottom line, -inf on ifsetor, -1 on goto.
Zeev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php