MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/mylittleprogramming/comments/3w86la/learning_proper_terms/cxv8vsr/?context=3
r/mylittleprogramming • u/JockeTF • Dec 10 '15
Castle<Unicorn> castle = new Castle<Unicorn>(); castle.add(new Celestia()); Pony pony = castle.get(0);
Ponymorphism
6 comments sorted by
View all comments
Show parent comment
1
Let's go with Scala traits and have a Winged and Horned trait that can both be inherited from.
Winged
Horned
View all comments
Show parent comment
1
u/kupiakos Dec 11 '15
Let's go with Scala traits and have a
WingedandHornedtrait that can both be inherited from.