Re: [RFC] Scalar Type Hints
| From: | Marco Pivetta | Date: | Thu, 01 Jan 2015 16:56:37 +0000 |
| Subject: | Re: [RFC] Scalar Type Hints | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80061@lists.php.net to get a copy of this message | ||
On 1 January 2015 at 17:44, Thomas Bley <mails@thomasbley.de> wrote:
> I think it is no problem to add strict parameter type hints with another
> rfc (if this rfc gets accepted), e.g. function foobar(string! $str, int!
> $str){} or any other syntax.
>
The problem is that the current proposed hints/casts are deviating from the
type-hints that we are used to, therefore this particular feature should
(eventually) have an alternate syntax, whereas the strict hints would just
use
int, integer, string, float,
bool, boolan without
additional chars (assuming that we will get strict hints somewhen).
This will also reduce clashes with the current HHVM implementation.
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/