31.07.2013 Views

Adobe PDF

Adobe PDF

Adobe PDF

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Polymorphism - Definition<br />

poly ( many ) + morph (forms i.e shapes i.e.<br />

types)<br />

polymorphism = values taking more than one type<br />

(recall: values of a type share representation i.e share<br />

shape)<br />

Values – may be simple data, functions, or objects.<br />

2 major kinds<br />

ad-hoc : not true but apparent polymorphism.<br />

Syntactic Reuse<br />

universal: true polymorphism.<br />

Semantic Reuse<br />

4/11/2008 Sundar B., BITS, Pilani. CS C362 4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!