> From: a...@ajf.me
> Date: Sun, 14 Sep 2014 00:30:40 +0100
> To: internals@lists.php.net
> Subject: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast
> 
> Good evening,
> 
> I’ve given up on my plan B, so I’m putting this RFC, finally, to a vote.
> 
> I would urge you to vote in favour. It is not going to please everyone, it is 
> after all a compromise proposal. However, I have tried my best to strike a 
> balance between complete weak typing and strict typing. If this passes, we 
> will finally have userland type specifiers for scalar types. It’s not 
> perfect, but I’d argue it’s far better than nothing.
> 
> Voting starts today, 2014-09-14, and ends in a week’s time, 2014-09-21.
> 
> Thanks!
> 
> https://wiki.php.net/rfc/scalar_type_hinting_with_cast#vote
> --
> Andrea Faulds
> http://ajf.me/
> 
> 

RE: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with CastThomas Punt  11:23 To: 
Andrea Faulds> From: a...@ajf.me
> Date: Sun, 14 Sep 2014 00:30:40 +0100
> To: internals@lists.php.net
> Subject: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast
> 
> Good evening,
> 
> I’ve given up on my plan B, so I’m putting this RFC, finally, to a vote.
> 
> I would urge you to vote in favour. It is not going to please everyone, it is 
> after all a compromise proposal. However, I have tried my best to strike a 
> balance between complete weak typing and strict typing. If this passes, we 
> will finally have userland type specifiers for scalar types. It’s not 
> perfect, but I’d argue it’s far better than nothing.
> 
> Voting starts today, 2014-09-14, and ends in a week’s time, 2014-09-21.
> 
> Thanks!
> 
> https://wiki.php.net/rfc/scalar_type_hinting_with_cast#vote
> --
> Andrea Faulds
> http://ajf.me/
> 
> 

>From a user-land developer perspective, I really detest this feature being 
>added into PHP. If PHP has features that will make it a stronger-typed 
>language, then it will undoubtedly lose its loosely-typed and forgiving nature 
>eventually. The evangelists for making PHP a strongly-typed language will 
>boast of its benefits (which will have some truth, in all fairness), and this 
>will only lead to the condemnation of PHP code that doesn't use these stricter 
>language features (slowly converting PHP into a stricter language). This isn't 
>the easy-going and generally-liked nature of the PHP language in _any_ way. 
>Whilst I can see there are benefits of making PHP stricter, I for one would 
>rather keep PHP as a loosely-typed and forgiving language. After all, if I 
>wanted to use a strongly-typed language for building websites, then I'd be 
>using Java instead.
The only part of the discussion I liked on this topic was the ability to use 
explicit type casts as part of the function signature. Whilst it is a bit of a 
syntactic sugar (which will cut out on some PHP code in the function body too), 
it does give the function parameters some sort of signature that will show 
their expected set of values (assuming developers know the casting rules, of 
course).
-Tom
(P.s sorry for the double email Andrea, I accidentally sent this to you only 
the first time...)> 
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
                                          

Reply via email to