Is there a compiled* programming language with dynamic, maybe even weak typing?

sub picture sub · Mar 31, 2010 · Viewed 9.6k times · Source

I wondered if there is a programming language which compiles to machine code/binary (not bytecode then executed by a VM, that's something completely different when considering typing) that features dynamic and/or weak typing, e.g:

Think of a compiled language where:

  • Variables don't need to be declared
  • Variables can be created during runtime
  • Functions can return values of different types

Questions:

  • Is there such a programming language?
  • (Why) not?

I think that a dynamically yet strong typed, compiled language would really sense, but is it possible?

Answer

Stephen picture Stephen · Mar 31, 2010

I believe Lisp fits that description.

http://en.wikipedia.org/wiki/Common_Lisp