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]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to