From: Bill Vrotney
Subject: Re: Is LISP and/or Scheme considered to be untyped...???
Date: 
Message-ID: <1993Aug26.034604.13901@ads.com>
>
>   4.  The terminology for this topic is confused.  SICP uses "manifest type" $
>   describe the state of affairs in which every datum has a type tag attached.
>   R4RS calls this "latent type" and uses the phrase "manifest type" to descri$
>   the situation in which the type is associated with the variable rather than
>   with the value.  R4RS goes on to suggest synonyms in the literature:
>           latent = weak = dynamic ( = SICP "manifest" = "untyped" )
>           manifest = strong = static
>   I guess it depends whether you're focusing on the datum or on the variable,
>   which you want to call "manifest."
>

To change the subject slightly. As I do more and more AI programming in Lisp
I find myself doing more and more explicit type checking.  It seems to be a
powerful device. When I consider replacing that type checking code with its
analogue (not implementing a type tag) in a statically typed language like
C++ it seems like it will be more INEFFICIENT, contrary to the one of the
selling points of statically typed languages. Of course if I implement a
dynamic type tag in a statically typed language, that corresponds to roughly
the same thing, then its efficiency seems to become a separate argument and
other issues come into play.

My question is, has anyone researched the thesis that "dynamically typed
languages start becoming MORE efficient than statically typed languages for
complex programs that use explicit type checking"? Or am I overstating the
obvious?


- After I read my post I realized that it may have been unclear. What I
meant by explicit type checking was not to check for type errors but to
dispatch on the object type as a useful property of the running program
apart from error type checking.



--
Bill Vrotney
BAH/Advanced Decision Systems
From: Barry Margolin
Subject: Re: Is LISP and/or Scheme considered to be untyped...???
Date: 
Message-ID: <25m6d3INNn4c@early-bird.think.com>
In article <······················@ads.com> ········@ADS.COM (Bill Vrotney) writes:
>To change the subject slightly. As I do more and more AI programming in Lisp
>I find myself doing more and more explicit type checking.  It seems to be a
>powerful device. When I consider replacing that type checking code with its
>analogue (not implementing a type tag) in a statically typed language like
>C++ it seems like it will be more INEFFICIENT, contrary to the one of the
>selling points of statically typed languages. Of course if I implement a
>dynamic type tag in a statically typed language, that corresponds to roughly
>the same thing, then its efficiency seems to become a separate argument and
>other issues come into play.

Devil's Advocate time....

C++ already has a form of dynamic typing, by using virtual member
functions.  These dispatch on the runtime class of the object.
Unfortunately, this facility is limited to classes, so you must define
wrapper classes for built-in types if you want to be able to include them
in your universe.  In practice, I expect that this limitation isn't
serious.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar