On Thu, Feb 19, 2015 at 12:50 AM, Anthony Ferrara <ircmax...@gmail.com>
wrote:

> Leigh,
>
> >> Internal Functions Like ceil() Return Unexpected Types
> >
> > My opinion is that functions should return sane types for their
> > intended purpose, and functions that do not should be "fixed".
>
> I agree 100%. I just think that's outside the scope of this proposal.
>
> >> Static Analysis Is Possible With Weak Declarations
> >
> > The advocacy of allowing `accepts_float(returns_int());` doesn't help
> > the cause of static analysers in strict mode.
>
> Java does exactly this and is statically analyzable. So...?
>

PHP is not a language for static analyzes or verification!!!
Strict typing shouldn't be done on language level.
it may be implemented as a custom verification extension, but please, don't
break the language itself.

Thanks. Dmitry.



>
> > Still no mention of a way to enable strict by default. So lets try
> > some different rationale. If I personally want to develop in strict
> > mode, I can do that with this proposal, I can add a declare to the top
> > of every file and be as strict as I like. However not everyone else is
> > going to want to use my code in strict mode, so they will have to go
> > and remove some/all of those strict declarations. (Lets take callbacks
> > being evaluated in the context they are called rather than the one
> > they are created in). I would like a way of enabling strict by
> > default, immutable to scripts so that users cannot be forced into this
> > mode, and lets the radicals and the weaklings* play together in
> > harmony.
>
> I missed that discussion point, so I've just added it:
>
> https://wiki.php.net/rfc/scalar_type_hints_v5#why_not_add_an_ini_setting_for_default_mode
>
> > For the rest of the RFC, I either agree with or have no strong
> > opinions about the points raised.
>
> Thanks for the input :-)
>
> Anthony
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to