Lush is an object-oriented programming language designed for researchers, experimenters, and engineers interested in large-scale numerical and graphic applications. Lush is designed to be used in situations where one would want to combine the flexibility of a high-level, weakly-typed interpreted language, with the efficiency of a strongly-typed, natively-compiled language, and with the easy integration of code written in C, C++, or other languages. Lush is Free Software (under the GPL license) and runs on GNU/Linux, Solaris, Irix, and Windows under Cygwin. Lush can be used advantageously for projects where one would otherwise use a combination of an interpreted language like Matlab, Python, Perl, S+, or even (gasp!) BASIC, and a compiled language like C. Lush brings the best of both worlds by wrapping three languages into one: (1) a weakly-typed, garbage-collected, dynamically scoped, interpreted language with a simple Lisp-like syntax, (2) a strongly-typed, lexically-scoped compiled language that uses the same Lisp-like syntax, and (3) the C language, which can be freely mixed with Lush code within a single program, even within a single function. It sounds complicated, but it is not. In fact, Lush is designed to be very simple to learn and easy to use.

Website | Source

Lush uses a very simple Lisp syntax. If the word "Lisp" sends shivers down your spine, be advised that the dialect of Lisp that Lush implements is extremely simple to learn, with possibly one the simplest syntaxes around. Most scientists, engineers, and software developers who have learned Lush have become proficient at it in a few days, even if they had no prior exposure to Lisp. It's very simple. Really. In fact, Lush has been used to teach programming to kids.

The Lush compiler has several interesting properties, and a few limitations. Its main advantage is that it generates very efficient C code which is then compiled with the best available C compiler for the machine considered and loaded dynamically. The C code produced does not simulate a virtual machine, it is real, low-level, bang-the-metal, no-runtime-check, don't-break-for-animals, C code, just like what you would write by hand. Its main disadvantage is that, although it compiles a Lisp-like language, it does no more for you than what a C compiler would (no automagic memory management, no garbage collection, no functional programming).


Tags: language   lisp   maths   native  

Last modified 07 October 2024