Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Thanks for this. By coincidence, I was sketching out a polymorphism kludge this evening, and this was food for thought.


sort by: page size:

What sort of polymorphism did you have in mind?

Polymorphism?

polymorphism?

Polymorphism.

Polymorphism is complex.

I see, I had forgotten about that, but it's not exactly polymorphism, right?

Simple explanation of Polymorphism and its philosophy

No? Also, there's more than one kind of polymorphism.

Isn't that just polymorphism? There are lots of ways to get that.

I already mentioned other types of polymorphism.

The second property you mention has a good name: polymorphism

Thanks for the nice example. I've heard of traits but hadn't read enough to know what they are. Looks like a form of multiple inheritance. The example you gave shows polymorphism via traits. That was helpful to me.

What is polymorphism as you’re using the term?

'Bimorphic', 'trimorphic', 'megamorphic' are all increasing degrees of 'polymorphism'. Something that is 'bimorphic' is also 'polymorphic', but is not 'megamorphic'.

Cool. Thanks for the feedback! I'll take a look in evolution.

It is related, really.

Polymorphic: many shaped. Monomorphic: single shaped. Isomorphic: same shaped.


Is it polymorphic?

I mean, I don't actually believe you that all those levels are polymorphic. :-)

They did not specifically state it but I believe he/she was referring to subtype polymorphism. Parametric polymorphism as you describe is far more useful imho.
next

Legal | privacy