by nvader · 6y ago · 0 comments
In Self, you have a cow. You ask the cow to moo. It moos.
In Java, you have a cow. You construct a CowMooFactory to create an MooIpml. The MooImpl moos.
In Python, you have a cow. You ask it to moo. It quacks.
In C, you have a pointer to a cow. You ask it to moo. Segmentation fault (core dumped).
This pattern is called a Moonad.
In Ruby, your value moos. Could be a cow; might be a MooDuck. Do you really care?
Edited to add: Please don't take my question as rhetorical attack - it was intended as inquiry. There may be different definitions floating around.