Re: Reviving scalar type hints
| From: | Stanislav Malyshev | Date: | Wed, 18 Feb 2015 08:18:30 +0000 |
| Subject: | Re: Reviving scalar type hints | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83032@lists.php.net to get a copy of this message | ||
Hi!
> So let's talk compromise.
> Would leaving internal functions out of the picture at this stage
> change you mind? This is effectively what Hack does, internal
> functions are explicitly marked as "coercible".
For me, the option that makes users remember which functions are
internal and which are not, because they work radically different (and I
don't mean in some small detail, I mean up to a complete failure if I
get it wrong) is not something I'd really like.
> Would a tri-state option make sense? ('weak-all',
> 'strict-user/weak-internal', 'strict-all')
> How do we get from here to something you would like?
Two semantics in the same language are bad enough. Three, IMHO, is just
a no go, dealing with code having three different semantics would be
completely impossible.
--
Stas Malyshev
smalyshev@gmail.com