Re: [VOTE] Scalar Type Hints

From: Date: Sun, 08 Feb 2015 05:21:03 +0000
Subject: Re: [VOTE] Scalar Type Hints
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-82114@lists.php.net to get a copy of this message
Hi! > I don’t think it’s unfair. There’s a limited set of permitted > conversions in some strictly-typed languages, but it’s still > strictly-typed. The main problem with strict typing as it is being proposed by strictness proponents is exactly that - there's no limited set permitted. It leads to absurd limitations like 1 not accepted where a float value is required, or where a boolean value is required. That's the essential problem with this proposal - it sacrifices the frequent use cases that make sense to nearly everybody for abstract bondage-and-discipline notion under misguided assumption that it would be a service to the users. In fact, if forced to use this API, people would probably just learn to do (float) each time they call such function, which makes them just do more work for something they could have - and already do have, in internal functions - for free. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#82114) next »