GT500FOMOCO
Programmer
What does polymorphism mean in relation to java? I can't remember! This is what said:
polymorphism
A concept first identified by Christopher Strachey (1967) and
developed by Hindley and Milner, allowing types such as list
of anything. E.g. in Haskell:
length :: [a] -> Int
is a function which operates on a list of objects of any type,
a (a is a type variable). This is known as parametric polymorphism. Polymorphic typing allows strong type checking
as well as generic functions. ML in 1976 was the first language with polymorphic typing.
Ad-hoc polymorphism (better described as overloading) is the
ability to use the same syntax for objects of different types, e.g. "+" for addition of reals and integers or "-" for unary
negation or diadic subtraction. Parametric polymorphism
allows the same object code for a function to handle arguments
of many types but overloading only reuses syntax and requires
different code to handle different types.
I can't understand that, it doesn't seem to make any sence to me or anyone else I've asked. Please help me!
polymorphism
A concept first identified by Christopher Strachey (1967) and
developed by Hindley and Milner, allowing types such as list
of anything. E.g. in Haskell:
length :: [a] -> Int
is a function which operates on a list of objects of any type,
a (a is a type variable). This is known as parametric polymorphism. Polymorphic typing allows strong type checking
as well as generic functions. ML in 1976 was the first language with polymorphic typing.
Ad-hoc polymorphism (better described as overloading) is the
ability to use the same syntax for objects of different types, e.g. "+" for addition of reals and integers or "-" for unary
negation or diadic subtraction. Parametric polymorphism
allows the same object code for a function to handle arguments
of many types but overloading only reuses syntax and requires
different code to handle different types.
I can't understand that, it doesn't seem to make any sence to me or anyone else I've asked. Please help me!