2012/7/25 Nikita Popov <[email protected]>:
> particular with namespaced code). So if you have some kind of
> Code\Generator class, you're screwed.
> Keywords don't grow on trees, you know ;)
Hm. Ok, thats a problem.
Oh, man, do I really have to find a good keyword myself? Maybe we
should use a password-generator. :)
Seriously, how's about
yielder hugo() { ... yield ...}
Feels right, but my native language is not english, so I risk to make
me a fool. I think that also names what it really is: A yielder yields
something. In this case: An iterator yielder yields an iteration. I
think I would like that.
And the word is per sure not common. :)
Ahmm, if you don't like it, would you be so kind to make a suggestion? TNX
> Also I'd like to point out that being similar to other languages is in
> the general case a *good* thing. So if you say "It doesn't matter how
In general I agree. For PHP I do not. This case is a little bit
different, because the targets are self-explaining and simplicity.
> Deviating from the
> "standard" generator implementation without having good reasons seems
> rather pointless to me.
But I gave good other reasons. :)
Conclusion:
==========
Fact: generator is not a good keyword, because too common.
Answer: I made a new sugestion with the keyword "yielder".
Fact: in general it's a good idea to implement features, like in other
languages.
A: Correct, but
Fact: PHP has different architectural targets which doesn't mean to
make everything different, but ...
Experience: in this case I'm sure, it's not the best way to make it
like any other language.
Experience: If you have enough reasons to make things different, don't
look too much how others are doing.
Experience: Most PHP-programmers are not so experienced like most
programmers in other languages.
(Can't be proven, but I would bet for it.)
--
Alex Aulbach
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php