Polimorfisno

Da Object-Oriented Programming with Objective-C © Apple Inc. del 2008-11-19.

Overloading: The terms “polymorphism” and “argument overloading” refer basically to the same thing, but from slightly different points of view. Polymorphism takes a pluralistic point of view and notes that several classes can each have a method with the same name. Argument overloading takes the point of the view of the method name and notes that it can have different effects depending on the arguments passed to it. Operator overloading is similar. It refers to the ability to turn operators of the language (such as == and + in C) into methods that can be assigned particular meanings for particular kinds of objects. Objective-C implements polymorphism of method names, but not argument or operator overloading.

Forse sono troppo legato a Java, e il fatto che adesso sia in mano a Oracle mi fa cercare delle alternative anche di nicchia in maniera irrazionale, ma se questo è il polimorfismo dell’Objective-C…

R 20110111 1937

Autore: eDue

Bieco illuminista

Un commento su “Polimorfisno”

Lascia un commento