Comment

Comment by lispm

> Classically, dynamic languages have been interpreted, that is, evaluated at run- time by an interpreter program. In recent years, dynamic languages have also been complied, that is, translated to another language such as native code before being executed.

Strange, I thought I have seen compilers for languages like BASIC for a long time. The first LISP compiler is from the early 60s: http://www.bitsavers.org/pdf/mit/ai/aim/AIM-039.pdf

Scheme compilers are from the 70s. Rabbit for Scheme: https://dspace.mit.edu/handle/1721.1/6913

> We conclude that ahead-of-time compilation is a viable alternative to interpretation of dynamic languages

Especially when the AOT compiler can be used incremental and the program can be extended/modified incrementally. See sbcl.

> The project then showed that it is possible to compile this dynamic language ahead-of-time to a native binary, using a statically typed language as an inter- mediate step.

This has been known for a long time.

For example Kyoto Common Lisp from 1985: http://www.softwarepreservation.org/projects/LISP/kcl/doc/kc...

Design and Implementation of KCL:

http://www.softwarepreservation.org/projects/LISP/kcl/paper/...

KCL has been morphed into newer implementations like ECL and CLASP (addresses LLVM) over the years.

Or CLICC:

http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=522...

Or Stalin for an attempt on a highly optimizing whole-program compiler for Scheme: https://github.com/barak/stalin

> Overall the project found that compiling a dynamic language ahead-of-time is a viable alternative to interpreting the language

See SBCL: http://www.sbcl.org

parent lispm 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton