On Wed, 11 Mar 2020 at 14:18, Mike Schinkel <m...@newclarity.net> wrote:
> if interfaces cannot enforce the requirements of the "contract" why have > interfaces? Because they are a useful tool, and cover a lot of people's use-cases. But most people who use doc block annotations currently don't seem to have a need for enforcing required attributes. While it's true that people can make different choices when it comes to trade-offs, enabling some trade-offs to be supported by PHP natively is a separate trade-off. aka I think it's perfectly reasonable to want this to be supported natively, I can't currently see it being a useful trade-off for PHP core. btw I'm finding it difficult to see precisely what you're suggesting, which makes responding to it difficult. If you want to discuss this, would it be possible for you to write up exactly what you're proposing? Preferably in a new thread as it's outside the scope of what's being proposed by this RFC. Also, someone would need to do the work of thinking about inheritance and exactly how you would specify between 'required override', 'optional override', and maybe even 'never override' for attributes (aka some for of variance for attributes), for us to even consider the idea properly. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php