Re: [RFC][DISCUSSION] - Throwables error code's type generalization

From: Date: Sun, 18 Dec 2016 12:07:31 +0000
Subject: Re: [RFC][DISCUSSION] - Throwables error code's type generalization
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-97439@lists.php.net to get a copy of this message
Hey Wes, On Sun, Dec 18, 2016 at 12:03 PM, Wes <netmo.php@gmail.com> wrote: > Will be nice to have regardless if PHP gets stuff like enums. It's not > just a dirty fix. > > Strictly speaking it is not a BC change because int is not > actually > enforced at all. Also this would be a problem in other languages... > According to this reasoning, all documentation should be disregarded and considered void, because type documentation is unenforced. That would also mean that any pre-PHP7 code that defined return types via docblock are basically unusable. The fact that PHP's type system doesn't enforce it doesn't mean that we should blindly allow everything everywhere, as that removes any sort of guarantees on contracts, making it impossible to reason about what the code will do. But if you think it'll be necessary I'll require 2/3 of the votes. > It's a core change anyway, no? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#97439) next »