lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>> j@jmawebb.cjb.net 07/07/04 12:53PM >>>
> The problem I have with this argument is that a static type checker:
> a) is more reliable
> b) will tell you exactly where the problem is, rather than throwing
up
> an error at some point later when you try and misuse a value.

The dynamic-typing enthusiasts don't deny that static type
checking is useful (they were all strong-typing enthusiasts, after
all ;)).   They just wonder whether it is useful enough to 
justify the extra work.

(1) it is no guarantee of program correctness, and 
may even give people false confidence.  After all, there is
such a thing as strongly-typed garbage.

(2) it has a definite cost in programmer productivity.  Why waste
all that time waiting for GCC?  It's certainly become a factor
in my thinking and directly inspired some of my own work (e.g.
the UnderC C++ interpreter.   BTW one of the goals of that
project was to separate out two productivity issues, one which
was dynamic typing per se and the other was simply a 
faster modify-go cycle)   

Lua gives the programmer something even more interesting,
which is the ability to create an environment which is as
permissive or restrictive as you wish.   I believe it would be
possible (although probably would be expensive) to insist
that certain variables only refer to MyClass, for instance.

steve d.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.