Re: [PHP] optional type hinting enhancements

2009-01-19 Thread Nathan Rixham
question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properties in PHP? This would all be under the assumption and proviso that an implementation would not break bc, have any markable perfomance hit, or in any other way effect existing

Re: [PHP] optional type hinting enhancements

2009-01-19 Thread Lukas Kahwe Smith
On 19.01.2009, at 00:00, Nathan Rixham wrote: Jochem Maas wrote: Nathan Rixham schreef: Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel

Re: [PHP] optional type hinting enhancements

2009-01-19 Thread Robert Cummings
On Sun, 2009-01-18 at 23:09 +, Nathan Rixham wrote: Török Alpár wrote: I see a problem with this. Scalars are automatically casted by PHP based on a set of rules. In case of a scalar type hint, would jo issue an error, or make the automatic type cast? both approaches have there

[PHP] optional type hinting enhancements

2009-01-18 Thread Nathan Rixham
Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class properties in PHP? examples

Re: [PHP] optional type hinting enhancements

2009-01-18 Thread Jochem Maas
Nathan Rixham schreef: Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class

Re: [PHP] optional type hinting enhancements

2009-01-18 Thread Török Alpár
I see a problem with this. Scalars are automatically casted by PHP based on a set of rules. In case of a scalar type hint, would jo issue an error, or make the automatic type cast? both approaches have there advantages, but the automatic cast, would go better with the actual features of the

Re: [PHP] optional type hinting enhancements

2009-01-18 Thread Nathan Rixham
Jochem Maas wrote: Nathan Rixham schreef: Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables

Re: [PHP] optional type hinting enhancements

2009-01-18 Thread Nathan Rixham
Török Alpár wrote: I see a problem with this. Scalars are automatically casted by PHP based on a set of rules. In case of a scalar type hint, would jo issue an error, or make the automatic type cast? both approaches have there advantages, but the automatic cast, would go better with the

Re: [PHP] optional type hinting enhancements

2009-01-18 Thread Török Alpár
2009/1/19 Nathan Rixham nrix...@gmail.com Török Alpár wrote: I see a problem with this. Scalars are automatically casted by PHP based on a set of rules. In case of a scalar type hint, would jo issue an error, or make the automatic type cast? both approaches have there advantages, but