Re: [RFC] Scalar Type Hinting With Casts (re-opening)

From: Date: Tue, 15 Jul 2014 17:31:14 +0000
Subject: Re: [RFC] Scalar Type Hinting With Casts (re-opening)
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-75554@lists.php.net to get a copy of this message
Stas Malyshev wrote (on 15/07/2014):
Having more than one set of rules for implicit cast makes no sense to me at all and will only lead to more confusion and frustrated users.
That's only a problem if you frame the new hints as "a type of implicit cast". If they were to be described in relation to existing functionality, I'd describe them as a new type of *explicit* cast, but as mentioned elsewhere, I'd be happy for them to exist outside of function signatures too as a new notion of "strict cast". That way, we remove the expectation that they will act the same as some other feature, and can simply evaluate their usefulness as a new, separate, feature.

« previous php.internals (#75554) next »