In Java, you’d say new Pony("black")
, and the pony is made by
Pony(String color)
. In Ruby, you’d say
Pony.new("black")
and the pony-maker is
initialize(color)
. In Python, you’d say
Pony("black")
and the pony-maker is
__init__(self, color)
.
I wonder which is best? Does all this seem kind of ad-hoc?
Anyhow, in real life, a Java programmer
would start with an AbstractEquineBreederGenerator
and work from
there. And for Ruby you’d be able to say
mySpecialPresent.get do | pony |
, and it would clean up the pony
poop for you (but the pony would be named Kurofune). Python programmers are
Serious Men
and Women who Don’t Have Time For Ponies.
[Update: The email is already swirling in. Stand by for another virtual
comments section.]