11 ottobre 2011

eXtreme Polymorphism

from the object-oriented dept.

Idea idea! What about polymorphic conditionals? In such a way, we don't need the if, else and related keywords. Let's try in Ruby:

Great, isn't it? But wait, someone already invented this! :-)

Ruby is a great language, however it has too many keywords that could be substituted with object-level messages. Simplicity always leads to elegant solutions, and Smalltalkers know what I am talking about.

Nessun commento: