Re: [RFC][DISCUSSION] Object type hint

From: Date: Mon, 24 Oct 2016 10:16:56 +0000
Subject: Re: [RFC][DISCUSSION] Object type hint
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-96587@lists.php.net to get a copy of this message
> On 24 Oct 2016, at 07:45, Michael Morris <tendoaki@gmail.com> wrote: > > My principle worry with this RFC is it encourages an anti-pattern - not > using interfaces and thereby not clearly labeling what objects can and > cannot do. > You've stated that as fact without any supporting argument, as far as I can see. Any piece of functionality can be abused and used for purposes other that the use-cases which it was intended for. But I don't see how this RFC 'encourages' what you consider to be a bad practice. Instead it provides a useful thing that could be misused by bad programmers. We shouldn't be designing the language so that it can't be misused by bad programmers - instead we should be designing it so that competent programmers have the tools that they want. And yes, not everyone will need/want this piece of functionality, but for the people who do want it, saying that they can't have it because it might be misused seems illogical to me. cheers Dan

« previous php.internals (#96587) next »