|
Posted by Jerry Stuckle on 08/11/06 01:12
Tony Marston wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:JqqdnZopOJbhTUTZnZ2dnUVZ_radnZ2d@comcast.com...
>
>>Tony Marston wrote:
>>
>>>"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>>>news:2L6dnVvcUY7DukTZnZ2dnUVZ_vednZ2d@comcast.com...
>>>
>>>
>>>>Tony Marston wrote:
>>>>
>>>>
>>>>>"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>>>>>news:MbydnaBugoftvUrZnZ2dnUVZ_qOdnZ2d@comcast.com...
>>>>>
>>>
>>><snip>
>>>
>>>>>Can you point to to any papers on the internet which say that such a
>>>>>practice is a good thing?
>>>>>
>>>>
>>>>That wasn't what I said. I said use the same function name - including
>>>>case - in different functions. In language such as C++ and Java you
>>>>could have any number of functions called "readFile". But I'm sure your
>>>>poor brain would blow at such an idea.
>>>
>>>
>>>Just because you *could* have many different functions with the same name
>>>does not mean that you *should*. Most people would find that confusing.
>>>
>>
>>Well, it's required for one of the mainstays of OO programming -
>>polymorphism - in every OO language.
>
>
> Having the same method available in different classes, especially when
> provided via subclassing, is not the same as having a single method name
> with the same spelling but different case mean different things. There is a
> diference between the two cases.
>
Yep. But it must really blow your mind away. I mean - two or three
functions with the same name? How obfusticating! ROFLMAO!
>
>>And even without polymorphism requirements, it works quite well. Only
>>stoopid Tony would find it confusing. Most people find it more confusing
>>to have things like:
>>
>> printInt
>> printString
>> printDouble
>> printEmployee
>>
>>etc. They find it much clearer to have one function name "print".
>
>
> A single function called print() is not the same as a series of different
> functions, which you advocate, called print(), prinT(), priNt() and prInt()
>
> There is nothing obscure about a function with the same spelling meaning the
> same thing regardless of case. But when a slight change in case is used to
> produce a tonally different function? Now *that* leads to obfuscated and
> unmaintainable code.
>
I never advocated print(), prinT(), priNt() and prInt(). YOU are the
only one who has ever mentioned it.
But you're too stoopid to even understand what you wrote vs. what
someone else wrote.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|