Squirrel (programming language)
Squirrel | |
---|---|
Paradigms : | Object oriented |
Publishing year: | 2003 |
Developer: | Alberto Demichelis |
Current version : | 3.1 (March 27, 2016) |
Typing : | dynamic |
Influenced by: | C ++ , Lua , Python , JavaScript |
Affected: | MiniD |
License : | MIT license |
squirrel-lang.org |
Squirrel is a dynamically typed , object-oriented programming language . It is particularly intended to be used in computer games and other application programs as an integrated scripting language . The design is essentially inspired by Lua . It is used, for example, in OpenTTD to create AI players. The compiler and interpreter together consist of no more than 6000 lines of C ++ code.
syntax
The Squirrel syntax is based on C ++ . A function that can calculate the factorial of a natural number x looks, for example, as follows:
function factorial(x)
{
if (x == 0) {
return 1;
}
else {
return x * factorial(x-1);
}
}
history
Squirrel was developed by Alberto Demichelis for a computer game project because he had problems with Lua garbage collection . In 2003 Squirrel was released under the zlib license .
Web links
- Official website (English)
- Squirrel Wiki (English)