On Sat, Mar 17, 2012 at 10:37 AM, Marco Pivetta <ocram...@gmail.com> wrote:
> Unenforced type hinting: > - If you have mixed types, then you just don't need type hinting. Lazy > devs can still avoid using it. Lazyness shouldn't really be > encouraged, so > providing some kind of "backwards compatibility" just makes the > feature > useless :\ > - This is not a feature, it's just better implicit documentation for > methods > I just want to quick point out that I suggested the idea of introducing a scalar type hint that would accept all scalars but would disallow passing in arrays or objects. Additionally, the proposal outlined the option of introducing aliases for the scalar hint (bool, int, float, string) which would help developers better declare their intentions in terms of how they expected to use the scalar type. I don't think Nikita was referring to my idea when he referenced "unenforced type hinting", as his examples show that passing in an object or array would both succeed even with an int (scalar) type hint. That said, I couldn't find a proposal suggesting a type hinting proposal that was purely documentational, so I wanted to take the time to make sure there was no miscommunication. Adam