"COMPUTER POWER TO THE PEOPLE! DOWN WITH CYBERCRUD!" - Theodor Nelson
Friday, September 12, 2003
Static Typing And Racism
I gleaned this from the comp.lang.smalltalk.advocacy newsgroup. I find this a great way to explain the benefits of dynamic typing/late binding systems. I know this might be a little going overboard or inappropriate, but I think it hits right on the head!
The opposite is static typing, which makes me think
of a segregationist, racist society, vs. an "open
Variables in a program are like *rooms* through
which objects pass. In a racist society some
waiting rooms were reserved for the *white objects*
only. No matter how capable a black object you were,
you were not allowed to enter rooms or areas which
had the type-declaration "for whites only" attached
In an open society you can enter rooms and places
based on your abilities and credentials, on what
you are capable of, not on how you look or are
"labeled" in your passport.
Similarly in a dynamically typed language you
can choose and reuse a class/object which *does
the job* - regardless of what its class is called!
Such a society, and such a program therefore would
seem to be more efficient in their use of resources.
So isn't it time we liberated programming from
the racism of manifest typing! Shouldn't we
assess objects based on what they can do, instead
of judging them based on their /declared/ type?