On 02/16/2015 06:58 PM, Sara Golemon wrote:
On Mon, Feb 16, 2015 at 2:50 PM, François Laupretre <franc...@php.net> wrote:
Once again, anyone can take over version 0.3, if it is so great. Why don't you 
do it ?
I will play the game, stop working on my proposal, and vote 'yes' again.
But don't ask me to do it in your place.

If nobody else does it, I will.

I think Andrea's 0.3 proposal was extremely well balanced, served
everyone's needs whether they would admit it or not, and who's only
failing (subjectively termed) was the use of declare().  I think
declare() is fine and not nearly as ugly as some have slandered it to
be, but I'm willing to read the winds and modify it for v0.4.

Straw poll:
1) <?php strict;
2) <?php-strict
3) use strict; (psuedo-namespace)
3) <?php // strict (I don't actually like HHVM's style, but if you do...)
4) declare(strict=true); (As a top-level declare only)
5) declare(strict=true); (exactly as in v0.3 -- maybe you liked it)
6) your write-in vote here

I'm not going to scope in union types, nullables, or falsables.  We
can leave that for a followup RFC, this one is contentious enough as
it is.

-Sara

As ugly as the declare() syntax is, "strict" means very little. What else qualifies as "strict"? It also seems likely to be confused with E_STRICT, which is something else.

So I suppose I'd hold my nose and stick with 4 or 5.

That said, I think it was Zeev (or maybe Andi?) that suggested tightening the coercion rules at the same time to reduce the need for strict mode. (Eg, "99 red balloons" silently becoming int 99 is asking for trouble even in weak-mode.) I don't know if it's possible to tidy that up as well at this point, but it's a fair point that the coercion now is sometimes too forgiving.

I don't know enough about the internals code to suggest how to address Rasmus' points, but they sound valid from the outside, at least. Not steering people toward "well just throw casts around" is something to keep in mind.

--Larry Garfield

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

Reply via email to