Hi!

> I am against this. This is even more magic in PHP. Is it really that 
> difficult to have to mark the function with a different keyword, such as 
> "generator":

You have a point here, but "public static final generator function
foo()" sounds a bit long-winded to me... Also, we'd have then to decide
which function can be marked generator and which can't (e.g., interface
probably can't, abstract probably can't, anonymous probably can, etc.)
which adds more complexity.

Also, I think that people that complain about having to scan through
huge functions to see if they're generators or not, forget one thing:
documentation. Yes, there is a way to make the purpose of the function
understandable to a human without having him to do computer's work.
That's documentation. Undocumented code is broken code. Broken code is
not a good example when we're talking about right design.

> This should not be a concern, sure, it's annoying for the hiphop 
> developers but they chose to copy and then *chance* the PHP language for 
> their own effect.

Here I tend to agree with you - we should base on what's right for PHP,
not what HipHop or any other implementation is doing. If we can make
their lives easier - fine, but we don't have to be bound by their
decisions.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to