Nasal (programming language)

from Wikipedia, the free encyclopedia
nasal
Developer: Andy Ross
Current  version : 1.0.1   (July 4, 2006)
Important implementations : C.
Influenced by: C , Python , Perl , Lua
Operating system : platform independent
License : LGPL ( Free Software )
wiki.flightgear.org/Nasal_scripting_language

Nasal ( N ot a nother s cripting l anguage! ) Is a programming language that as a small, slim embedded scripting language for larger applications, like for example, Lua has been developed. Particular attention was paid to simplicity, transparency, slimness and balanced functionality without noticeably losing speed. The source code for the nasal interpreter is only 146 Kbytes.

Nasal was developed because established scripting languages ​​such as Python or Perl were too large for the author and often even exceeded the size of the programs in which the scripting language was to be embedded. Already existing small script languages ​​such as Lua, Scheme or Tcl appeared compact enough to the author of Nasal, but did not have sufficient functionality for his purposes.

The original goal in developing Nasal was therefore to make all known programming features of modern programming languages ​​such as objects, functions, fields and associative data fields available. At the same time, the bloating that can be observed in large, platform-independent scripting languages ​​such as Python, Perl, etc. should be avoided.

Features of the language

  • thread safe
  • offers automatic garbage collection
  • functional programming
  • common syntax of known common object-oriented programming languages ​​such as C ++ or Java
  • Vectors, hashes and scalars (numbers / strings)
  • slim interpreter (its source code is smaller than 146 kilobytes)

example

An example of the good readability and compactness of nasal code, here using a hello world program :

print("Hello World!");

use

Nasal is typically used as an embedded scripting language for larger applications or computer games. A well-known application for Nasal is, for example, the free flight simulator FlightGear .

Web links