On 17/03/15 23:53, André Rømcke wrote:
>>> >> To help towards that end, can someone who understands what is wanted
>>> >> from the weak type hint mode actually produce a summary of that as it is
>>> >> very difficult to extract just what has now been agreed for that area of
>>> >> type hinting. A base that can be used to review some of the other
>>> >> discussions to put that to bed. Others might appreciate a similar
>>> >> summary of the 'type_error' mode as well? As a base for the
>>> >> documentation on the user manual updates?
>> > 
>> > 
>> > Not sure what is "difficult to extract"
>> > 
>> > https://wiki.php.net/rfc/scalar_type_hints_v5#behaviour_of_weak_type_checks
>> > 
>> > It's all right there...

And there is nothing else in a substantial RFC that relates to weak mode?

> That part answers what has been agreed (or rather accepted), but not who the
> weak mode is for, and why.
> 
> Tried to sum that up last week when there was still discussions on this:
> http://share.ez.no/blogs/core-development-team/php-7-sth-from-user-perspective
> 
> TL;DR;  weak mode is for api consumers, aka normal php users, while strict is
>  for the actual target users of this features: api (library/framework) 
> creators.
> 
> Post also argues for why Zeev's adjustments to weak sth handling should still
> be done, as well as arguing for disallowing/fixing closure hint in strict 
> mode.

That is the sort of thing that will help nail down the edge cases in
weak mode André ... since the bulk of the RFC spends so much time
explaining why 'strict mode' is so much better? Yasuo has pointed out
details which are as pointed out perfectly correct, but it is still
worth documenting that this is what does happen, and therefore what
needs fixing.

What I am still having trouble with is just how one reworks phpeclipse
and other IDE's so that they know that if the open file AND another file
have declare(strict_types = 1); then the rules change. Anybody had a
look at that yet for PDT? It's all very well putting it into the core
and saying you don't have to use it, but all of the infrastructure now
needs to know what to do :(

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

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

Reply via email to