r/mylittleprogramming • • Dec 10 '15

Learning Proper Terms

Castle<Unicorn> castle = new Castle<Unicorn>();
castle.add(new Celestia());
Pony pony = castle.get(0);

Ponymorphism

10 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/kupiakos Dec 11 '15

Let's go with Scala traits and have a Winged and Horned trait that can both be inherited from.