|
Posted by Tony Marston on 06/25/06 13:45
"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:l7mdnYUJ5OPIEwPZnZ2dnUVZ_q-dnZ2d@comcast.com...
> Tony Marston wrote:
>> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>> news:4K2dnSM18oD9YQDZnZ2dnUVZ_oWdnZ2d@comcast.com...
>>
>>>David Haynes wrote:
>>>
>>>>Jerry Stuckle wrote:
>>>>
>>
>> < snip >
>>
>>>I really don't know how hard it would be to add - but I would like to see
>>>it added. One thing I don't like all that much is the untyped variables.
>>>It makes things "easy" - but leads to some sloppy programming.
>>>
>>>It also means you can't overload functions - at least not with the same
>>>number of parms. Typing the constructor arguments is a good start. But
>>>expanding that to other functions without breaking existing code might be
>>>more difficult.
>>
>>
>> You don't need function overloading in PHP. Why? First you need to look
>> at why other languages need it:
>> (a) To accept arguments of different types.
>> (b) To make some arguments optional.
>>
>> With PHP you can accept an argument of any type and then cast it to the
>> one you want, so item (a) is irrelevant.
>>
>> With PHP you can define a default value for an argument if it is not
>> supplied, so item (b) is irrelevant.
>>
>
> Sure. I would love to be able to have a function which does different
> things based on the type of parameter passed. It would save a lot of work
> trying to sort out parameters and potentially having to change existing
> code when adding new parameter types.
>
> But we already know you don't understand or appreciate real OO
> programming, Tony. So quite frankly, I don't give a damn what you think.
Just because my understanding and implementation of OOP is different from
yours does not make you right and me wrong.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|