Re: What do we need strict scalar type hints for?
| From: | Dmitry Stogov | Date: | Mon, 02 Feb 2015 18:55:24 +0000 |
| Subject: | Re: What do we need strict scalar type hints for? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81627@lists.php.net to get a copy of this message | ||
On Mon, Feb 2, 2015 at 9:05 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> hi,
>
> On Mon, Feb 2, 2015 at 4:12 PM, Dmitry Stogov <dmitry@zend.com> wrote:
> > hi,
> >
> > could you please write down few use cases, when strict scalar type hints
> > are really useful.
>
> I think there is one big misunderstanding in Andrea's RFC.
>
> Strictness is local only. Or to say it in a better way, only the
> maintainers of a given library will bother with it.
Actually, not.
The proposal makes declare() work on caller side.
So, each usage of a library function in user code may be wrapped with
declare() or not.
Thanks. Dmitry.
> Users of this
> library do not, there will be no change there from what we had in the
> 1st rfc. Or they can if they want.
>
> Keeping that in mind, the declare statement, as ugly as it may look,
> could be actually a killer to finally get what both camps want but
> never (and never will) manage to agree.
>
> --
> Pierre
>
> @pierrejoye | http://www.libgd.org
>