[plt-scheme] Why do folks implement *dynamically* typed languages?

From: hendrik at topoi.pooq.com (hendrik at topoi.pooq.com)
Date: Wed May 30 20:22:36 EDT 2007

On Wed, May 30, 2007 at 12:58:45AM -0400, Carl Eastlund wrote:
> Which way are you asking?  Your subject line asks one question, but
> your content asks another.  I guess you are trying to ask "why dynamic
> languages?"
> 
> Here's why I like dynamically typed languages: because types are far
> too important too me.  I'm not going to let some tyrannical type
> checker decide in advance what type system I'm going to use for all
> programs.  I'm going to use whatever notion of types is appropriate
> for my current task, and check as much of that statically as I can.
> If ML's type checker, or Haskell's type checker, or Java's type
> checker can't verify my invariants, or worse reject my program as an
> error - all static type checkers are guaranteed to reject some 100%
> correct programs as errors - I'd be out of luck in those languages.
> I'm always in luck with Scheme.
> 
> It puts a lot of responsibility on me to get the system right, but I
> can live with that.

Yeah.  Most statically-typed languages are deficient in this respect.  
So you have to go from a language with draconian static checking 
to one with none at all.  A poor set of alternatives.

There's one static type that statically typed languages leave out. 
That's the only one dynamically typed language implement.  There's no 
reason not to have a type that describes a variable that can have any 
value whatsoever, together with run-time type information, together with 
the suite of operations you need to make it useful.  The thing to know 
is that an _int_ value many be a very different thing from an _any_ 
value that happens to be an integer.

-- hendrik


Posted on the users mailing list.