Re: RFC: Protocol Type Hinting

From: Date: Tue, 25 Jun 2013 16:39:33 +0000
Subject: Re: RFC: Protocol Type Hinting
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 25 June 2013 18:32, Laruence <[email protected]> wrote:
> On Tue, Jun 25, 2013 at 11:57 PM, Anthony Ferrara <[email protected]> wrote:
>> Hey all,
>>
>> https://wiki.php.net/rfc/protocol_type_hinting
>> What do you think?
>
> Hey:
>    Just one question, usage?  why we need this? (run-time check is
> slow and I can not think out of a case then we must need it)

I'd rather see a proposal for:

$foo->setLogger(new Logger() {
  function log($message) {
    fprintf(STDERR, "%s\n", $message);
  }
});

Just sayin...

--
Regards,
Mike


Thread (50 messages)

« previous php.internals (#67815) next »