Re: RE: Optional scalar type hinting
| From: | Sam Barrow | Date: | Fri, 04 Jan 2008 14:25:04 +0000 |
| Subject: | Re: RE: Optional scalar type hinting | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34406@lists.php.net to get a copy of this message | ||
On Thu, 2008-01-03 at 15:58 -0600, Brian Moon wrote:
> I don't get it. We already have type hinting, just not for scalars.
> The discussion seems to be about whether or not we should have it all.
> But, the truth is, we have it. We half way have it. I fought for it to
> be all or nothing back then and I still think it is half done that we
> don't have scalar type hinting but we have array/object/class type
> hinting. Talk about inconsistency.
>
> So, can we switch the mundane conversation from "should we have type
> hinting" to "why don't we have scalar type hinting if we have non-scalar
> type hinting?" That is the real conversation. Type hinting is here.
> It is not going anywhere. Let's finish the job.
Yes. Atleast add a "scalar" type hint to differentiate from arrays and
objects. A scalar type hint complies with PHP's way of not
differentiating too much between strings, booleans, integers, and
floats.