[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strong Typing, Dynamic Languages, What to do?
I'm not sure exactly what you mean.
As I understand it:
Strongly typed: each datum has a definite type, and this type can't be
ignored arbitrary (e.g. by treating a pointer as an integer).
Statically typed: types for all data are known at compile time.
Dynamically typed: types for all data are known at run time.
Of course, there are gray areas; most strongly-typed languages support some
implicit conversions (int->long, float->double), and in OO languages you
can always treat a subclass as an instance of its superclass(es). Also,
many languages mix static and dynamic typing; C++ and java support run-time
type identification (dynamic typing) in a mostly-static framework. Many OO
systems are a way of getting some of the flexibility of dynamic typing in a
static setting.
By these definitions, scheme is strongly typed and dynamically typed.
Ocaml is strongly typed and statically typed. C is statically typed but
weakly typed. Forth and assembly are completely untyped.
Shriram, did I get that right?
Mike
> From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
> Date: Thu, 21 Mar 2002 08:58:11 +0100
>
> >>>>> "Kragen" == Kragen Sitaker <kragen@pobox.com> writes:
>
> Kragen> Brent Fulgham writes:
> >> I find myself in an uncomfortable state of language equivocation. I
> >> seem to be forever vascillating between the strongly-typed and
> >> "dynamic/untyped" programming languages.
>
> Kragen> Scheme and OCaml are strongly typed;
>
> Scheme *as a language*? No.
>
> --
> Cheers =8-} Mike
> Friede, Völkerverständigung und überhaupt blabla
>