2012/7/25 Sherif Ramadan <theanomaly...@gmail.com>:
> I don't understand what you find non-conventional about functions or
> methods that return objects.

Again: I don't have any problems with the object returning. :)

I see a problem that the mechanism isn't understood and used wrong.
And I think, that it is too easy to oversee that it is not a "normal"
PHP-function, because the "yield" is normaly in the middle of the code
and "return" at the end.

Both couldn't be changed. But it could help, if you name different
things different. That's just better than nothing. And it's easy. I
suggested that, but the arguments are some kind of ignored.
"No, it's their problem" (of course it is, but it's our job to help
them avoiding this) "No, functions can behave like this, because PHP
is not consistent at all" (of course it is, but this is a completly
new type) "No, we'll do it so, because other languages do it so and we
are used to it" (What an argument is that? Do we want to make a
java-clone?)


> Just between PHP 5.2 and 5.4 we've gained traits, closures,
> namespaces, function array derefrencing, access to member upon
> instantiation, and lots of other lovely additions to the language. I
> don't see languages like Java or Python evolving this quickly -- by
> contrast.

I don't see this as an compelling advantage. If it is done in the
wrong way, the learning curve could become to steep. I have no problem
with it, I use PHP every day, but as explained most PHP-developers
will have problems and I can say that, because I've more than 20 years
experience in that. Do you have that?
Every new feature should match into context. This one doesn't. I
suggested how to make it a little bit better and I explained why.

I'm just wondering... for whom is PHP developed, for the PHP-internals
or for PHP-developers?

-- 
Alex Aulbach

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

Reply via email to