[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: another take on hackers and painters!!
In a message dated 5/20/2003 3:02:19 PM Central Daylight Time, email@example.com writes:
>People who criticize static typing should annotate their offering with
>an indication of how much ML they have written. That would make them
>far more credible.
There are some deep problems involved in this statement.
+ If personal experience is the right measure for evaluating the
usefulness of language features we don't have any ground to discuss
these things. Your experience might be totally different from mine so
I can't speak for Shriram, but I interpret his comment in a somewhat
different way: if your concept of "static typing" is solely due to programming
in Pascal and Java (or, worse, C and C++) you may be arguing against
(or at least attempting to discuss) a different concept of "static typing".
There is a very real point to actually doing some ML or Haskell programming
to understand _that_ concept of "static typing".
For a number of trivial examples (e.g. the beloved factorial and fibonacci examples ;),
the code looks, and is typed in the same manner as a C program. These are poor
examples for or against static typing. A certain level of non-trivial experience with
ML-style (or I would add, Haskell-style) "static typing" does add to one's
The really deep problem with your comment is the following: some level
of shared experience is necessary: if you are teacher of calculus, it is
pointless to try to teach a student who has not yet grasped algebra!
The same is true in debating static typing--where static typing is the
concept as in ML or Haskell.
If someone has written a large scale applications in both Scheme and ML, and
says "once I got the types right, the program worked--the types were a tool for
debugging the logic of my application"-- that has a lot of weight. (I guess the
reverse is to say that "getting the types right in ML was a pain; the PLT Scheme
development environment plus dynamic typing helped me figure out _why_ the
types [and logic] were wrong. ;) Were someone to report this last to be the
case, I too would be perfectly happy!