On 4/14/2016 2:47 PM, Lin Yo-An wrote: > But weak type conversion and union type are not, it introduces more complex > rules of how variables should be converted into another values, and there > will be more implementation defined behavior. People will have to always > have a cheatsheet or something to check whether if they write the correct > code. > > And I believe, if we can remove the support of weak type conversion, PHP > could be a "consistent", "simple" language and it can help people write > confident code. >
I don't know what is complicated about "string|Stringable" or "Foo|Bar" since it is super self-explanatory. However, I find myself checking the docs (IDE or online) in which order I need to pass arguments to one of the various mixed up functions in the core all the time. PHP is not easy, it has so many quirks that one needs to know of that you could make a PhD only for that. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ This contains A LOT of that stuff. -- Richard "Fleshgrinder" Fussenegger
signature.asc
Description: OpenPGP digital signature