RosettaCodeData/Lang/ArkScript/00-LANG.txt

43 lines
1.8 KiB
Plaintext

{{language|ArkScript
|exec=bytecode
|site=https://arkscript-lang.dev
|gc=no
|parampass=value
|strength=strong
|checking=dynamic
|tags=arkscript}}
ArkScript is a small, fast, functional and scripting language for C++ projects, inspired by [[Lua]], [[Lisp]], and [[Python]].
The language has been designed to be concise, with only 9 keywords, and two rules to parse it:
# the first node after an opening paren <tt>(</tt> is a "function", the following nodes are arguments
# the only exception to the previous rule is when defining the argument list of a function
<syntaxhighlight lang="arkscript">
(let foo 5)
(let bar "hello world!")
(let egg (fun (a b c)
(+ a (* b c))))
(print (egg 1 foo bar))
</syntaxhighlight>
The language is also
* small: the core fit under 8000 lines of code ; also small in terms of keywords (only 9)
* a scripting language: very easy to embed it in your projects. Registering your own functions in the language is made easy
* portable: a unique bytecode which can be run everywhere the virtual machine is
* a functional language: every parameter is passed by value, everything is immutable unless specified
* powerful: provides closures and explicit capture
* promoting functionalities before performances: expressiveness often brings more productivity, though performances aren't left behind
* a Lisp inspired language, with fewer parentheses: [...] is expanded to (list ...) and {} to (begin ...)
* extensible: supports C++ module to use it in the language, adding functionalities
===Implementation===
The compiler and VM are implemented in [[C++]] 20. For more details, see [https://github.com/ArkScript-lang/Ark ArkScript GitHub].
===License===
ArkScript is released under the Mozilla Public License 2.0.
===Todo===
[[Tasks not implemented in ArkScript]]