On Mon, Feb 16, 2015 at 18:58, Sara Golemon <poll...@php.net> wrote:
> 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

Thank you so much for taking this up again, Sara!

>From my userland perspective, I would prefer <?php-strict or <?php strict;
as those options are shortest and would stand out the most. However, I would
also be okay with declare(strict=true); (as a top-level declare only).

use strict; has some appeal as a familiar syntax, but I think it also has
the potential to cause confusion. Would it also have to be the first
statement in a file, or could other statements / declarations come first?
If it is required to be at the top, that would be inconsistent with existing
use statements. If not, however, then it could be easily missed among other
namespace imports.

You probably already know about this, but FWIW Andrea had an incomplete
patch for the <?php strict syntax here:
https://github.com/TazeTSchnitzel/php-src/tree/scalar_type_hints_2_strict_alt_syntax.

Thanks again,

Theodore Brown

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

Reply via email to