Overloading methods in C API

jsaul jsaul at gmx.de
Sun Jan 19 13:41:04 CET 2003


* 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'?

Cheers, jsaul
-- 
Palo pa'que aprenda que aquí sí hay honor!
[Rubén Blades]




More information about the Python-list mailing list