Re: Re: Generic classes and methods RFC

From: Date: Thu, 10 Sep 2015 12:18:08 +0000
Subject: Re: Re: Generic classes and methods RFC
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-88133@lists.php.net to get a copy of this message
Andrea Faulds wrote on 06/09/2015 17:20:
If we hadn't seen the class declaration at the top which makes KeyType and ValueType be type parameters, we might not realise they weren't ordinary classes or interfaces when we looked at __construct. The -Type suffix you've used helps a little, but that's a convention, and isn't guaranteed to be used. Also, in some existing projects, there might be classes with that suffix.
As I understand it, the convention in a lot of languages is that type parameters are a single upper-case letter. I'm not sure if any enforce this restriction, though, and a sigil does seem more flexible and readable. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#88133) next »