Re: RAD vs. performance



Yet Another Dan wrote:
My impression is that a dynamically typed
interpreter is good for RAD, and a statically typed compiler generates
good performance.

Static typing also finds bugs. If you want your rapidly-developed
application to work then this is important.

CL can be either interpreted or compiled, and is
dynamically typed but has static "advisory" typing for final optimization.

Yet CLs performance is far worse than that of most modern, statically-typed
languages (e.g. MLs). Putting more effort into optimisation is no
substitute for designing a language that will run fast.

Is there any other language that does something like that?

All languages do "something like that". The problem with your question is
really that there is a blurry line between dynamic and static typing. There
are only "conventional beliefs". For example, dynamic typing is a special
case of static typing where no type checking is done at compile time.
Consequently, there is a range of static typing going from almost-dynamic
to very static. Java and SML are both considered to be "statically typed"
and, yet, Java code does a lot more run-time checking.

Switches
between interpreting and compiling, and between dynamic and static typing?

Many languages have both interpreted and compiled implementations.

There are OCaml macros to implement dynamic typing but they are just an
academic curiosity - OCaml programmers rarely (if ever) want to ditch
static typing. However, they often want to box values into variant type
constructors.

Is Lisp the only language with adjustabe typing and execution?

All languages have adjustable typing and execution. AFAIK, it is
prohibitively difficult to reap the rewards of static typing (particularly
performance) with an implementation within Lisp. Consequently, I suspect
such things are also an academic curiosity.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html
.



Relevant Pages

  • Re: Rubys lack of variable declarations : Good or Bad?
    ... The static typing advocates claim, that this catches errors earlier (at ... compile time not at runtime) and that in the long run this increases ... your program logic instead of focussing on "satisfying the compiler". ... hand-written dynamic constructs in statically typed languages (especially ...
    (comp.object)
  • Re: Which programming language is better to start
    ... It might be because English is not my native language, ... >> programmer I don't really care, I am not implementing a compiler. ... Yes, but I don't care about how difficult programming the compiler was, ... >> In that kind of situations, static typing gets in the programmer's way ...
    (comp.programming)
  • Re: Does purely functional way requires static typing?
    ... Compared to typical Haskell code, ... They think that static typing and ... Lisp does define the precise ... A compiler is nothing; it's just a subroutine for optimizing code. ...
    (comp.lang.lisp)
  • Re: dynamic typing question
    ... > One static typing advantage I've run into: ... the compiler shows you ALL places where compilation fails. ... > I am sure Python people have come up with strategies to deal with this ... That sounds like exactly the sort of problem that the Bicycle Repair Man ...
    (comp.lang.python)
  • Re: RAD vs. performance
    ... Static typing also finds bugs. ... fastest C compiler is about a factor 2. ... Java is statically typed, but most Java implementations ... All languages do "something like that". ...
    (comp.lang.misc)