Andrey Andreev wrote (on 15/07/2014):
I'm sorry, I know what you mean here and I'm not criticizing you
specifically (in fact, I'm intentionally taking it ouf of context),
but that's "PHP internals", not "PHP community".
Point taken, but there's plenty of overlap between the two; it's not
like everyone on this list is a 1337 hardcore C hacker who only writes
PHP code to test their latest cool patch to the Zend Engine. It would be
interesting to have this debate at a PHP conference or large user-group
and see if it came out the same way, but I've no particular reason to
suppose it wouldn't.
Unless you really force the camps to pick one by saying "you can't
have Y if we've got X" (to which there's no technical limitation, so
that's not true)
That's fine, as long as you don't count the syntax as part of the
feature. Since everybody would like their preferred version to be
written the same way, then, yes, there's a very obvious technical
limitation: given
function foo(int $bar)
there has to be a single interpretation. As soon as that interpretation
is chosen, it is chosen for all time, and there is no way we can make it
mean something else later.
Now, one form of compromise is to use variants of the syntax, such as...
function foo((int) $bar)
function foo(-int $bar)
function foo(+int $bar)
function foo(~int $bar)
function foo(int! $bar)
etc
...but we still have to decide which behaviour to implement first, and
which syntax to give it.
There's also variants of some of the features that really wouldn't make
sense to pick two of: I don't think anyone wants a language which has
"weak cast", "strict cast", and "really strict cast" alongside each
other. So we can't just say "implement all the versions and let users
choose", either.
I appreciate the frustration of the debate going round in circles, I
feel it too. But without a benevolent dictator, we have to somehow reach
a compromise. Feel free to suggest your preferred compromise, as long as
it's not "just do the one I want and maybe other people can add theirs
later with an as-yet-unspecified syntax" (not that that is what you were
asking for, exactly, I've taken it to extremes to make a point).
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php