[E-Lang] static typing
Tue, 19 Jun 2001 11:58:48 -0700
> Types can help you write your code in the first place, not just check
> it before you try to run it. Like how dimensional analysis can lead
> you straight to the right formula in physics, modulo some constant
> factor, type constraints can lead you straight to the right code.
> This is a good thing even without static checking. None of this says
> your language should force a particular type system on you, though.
I agree with the principle, though I think simply thinking about a program
in terms of objects, in which the classes (or the makers in E) define the
nature of the objects, gets you most, if not all, of the benefits wrt
helping the human have a reliable conceptual model. If this is true, the
static typing is mainly helping to ensure you followed your own
architectural plan. This is another reason, relating to the later material
in this email, why lisp would be a harsher world than smalltalk or E.
> I asked a friend who'd avoided Lisp largely from doubts about its
> dynamic typing, how did he get over them?
Darius, I just want to say, thank you for doing this exploratory work for
us. It is very helpful, even when it does not change our decisions about
what to do.
> <luke_> dc: well actually I was procrastinating heavily and Karl mentioned
> Erlang, and without knowing what it was I downloaded it and got hooked
> within an afternoon. says a lot for having good introductory manuals -
> you can nab people who only have a procrastinatory interest you're doing
> well :)
> <luke_> getting over fear of dynamic typing I think just came from hacking
> a dynamically typed language for a while and the world not ending :-).
> although Erlang did it for me and not lisp, because little things like
> compiler picking up on misspelled variable names or wrong number of
> arguments to local function calls etc helped to more slowly wean me off
> relying on the compiler a lot. I used to make lots of stupid/frustrating
> mistakes in lisp
This is really good stuff. There is a world of difference between a language
that will tell you if you misspelled a variable (a very limited level of
type checking) and one that does not. People who embrace static type
checking and are thinking about E should be comforted by the fact that they
are not really stripped naked when they engage E. I shall give some thought
to how to include this in the book.