develooper Front page | perl.beginners | Postings from December 2002

Re: Term Overloading

Thread Previous
Rob Dixon
December 27, 2002 13:49
Re: Term Overloading
Message ID:
Hi Paul

Operator overloading is using the same operator to serve for multiple data
types. For instance a language that differentiated between string and
numeric data may overload the '+' operator to perform string concatenation.
It is frequently used in object-oriented programming to define the action of
the usual operators on a new class. A module supporting, say, complex
numbers could overload the arithmetic operators to work on a (real,
imaginary) complex pair so that the subsequent programming is more



"Paul Kraus" <> wrote in message
> Programming Perl makes many references to overloading something. For
> instance overloading the angle brackets. What does this term mean. I am
> assuming it just mean changing the default behavior but I wanted to make
> sure.
> Paul Kraus
> Network Administrator
> PEL Supply Company
> 216.267.5775 Voice
> 216-267-6176 Fax

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About