I love this notion that having manifest type information tells you anything of value. Here's Cedric Beust on the matter:
This "continuous tax" is defined by the fact that when you need to maintain or use an API that was written in a language such as Ruby or Python, you have very little information available to you, and even if you eventually figure it out by looking at the sources of the tests (does anyone ever do that?), this knowledge you gain is ephemereal, and you will have to go through that same exercise if you need to modify this same portion of code a year later.
I have no idea why it helps me to know that an arbitrary variable is of type int or char. When confronted with an API like this:
this.startServer();
and some list of arguments, I'm helped a whole lot less than I am by something like this:
self startServerOnPort:
In the latter example, the name of the method describes the argument(s). In Smalltalk, you get method names that describe their arguments right in the method name - in languages like Java, you get long lists of easily interchanged variables, forcing you to look in secondary sources for the correct incantation.
Yes, there's a continuous tax, all right - but Cedric Beust is the one paying it, not me :)
Technorati Tags:
smalltalk, dynamic languages