Overloading methods in C API
Grant Edwards
grante at visi.com
Sun Jan 19 10:55:57 EST 2003
In article <20030119124104.GB840 at jsaul.de>, jsaul wrote:
> * Grant Edwards [2003-01-19 00:54]:
>> In article <b0cdjh$nsnhe$1 at ID-71831.news.dfncis.de>, James Kew wrote:
>>
>> >> For whatever historical reasons, operator overloading and
>> >> function/method overloading are usually considered as two separate
>> >> language features. C and python have the former but not the latter.
>> >
>> > *cough* C has neither.
>>
>> Nonsense. The operators + - * / do different things depending on the types
>> of their operands. That's operator overloading.
>
> Can you overload, say, the '*' operator to support multiplication
> of matrices or complex numbers in C as you can in both Python and
> C++? Obviously you can't. But you still call it 'operator
> overloading'?
Yes. It's neither programmer-controlled not extensible, but C has
overloaded operators.
--
Grant Edwards grante Yow! BARBARA STANWYCK
at makes me nervous!!
visi.com
More information about the Python-list
mailing list