Re: Scalar Type Hints v0.4

From: Date: Wed, 18 Feb 2015 00:53:15 +0000
Subject: Re: Scalar Type Hints v0.4
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-83015@lists.php.net to get a copy of this message
On 02/17/2015 04:35 PM, Nikita Popov wrote: > I don't buy into Rasmus arguments about internal functions. They concern > one particular edge case (int->float coercion) and I doubt they have much > relevance if applied to codebases with pervasive use of typehints (where > you can be reasonably sure of the types of your variables). Even if, for > the sake of argument, we acknowledge the concern as valid we should be > discussing that particular case (int->float coercion) rather than dropping > the strict typing for internal functions altogether. int->float is actually secondary to "123"->int. And while they may be edge-cases there are enough of them that we would be pushing people towards casting by default which should be a last-resort thing, not the first thing you do. -Rasmus

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#83015) next »