Description of the Scriptol programming language
Scriptol is a modern programming language, designed to be simple and
easy to learn, allowing new users ready to program in some hours. The
programming time is largely decreased.
Scriptol is object-oriented, xml-oriented, extensible, universal, uses
PHP libraries or Node.js modules. It is universal, that
means it is convenient for scripting, to build applications or to make dynamic
web pages.
A free scriptol compiler is available for
Windows and Unix.
The version 3 of the language compiled to JavaScript and working on Node.js is ideally suited for the programming and training of android robots, and representation of virtual worlds.
Features of Scriptol
Scriptol is :
- Objectively modern: it has been designed according to seven rules for simplicity and, safety, and doesn't carry ancient obsolete syntax.
- Object-oriented, it supports simple inheritance.
- Goal oriented: Set a goal and the processing to achieve it, and the maximum time allowed.
- XML oriented. XML may be embedded in Scriptol source code: it is compiled to an associative array (multi-levels). Associative arrays may be directly loaded and saved in XML files. This works with SVG files too.
- Reactive programming oriented. Define results like in a spreadsheet, cells are replaced by variables.
- Typed: the compiler can check for content and type of variables, that is not possible with usually untyped scripting languages.
- Natural: types are not based on computer's hardware but on human's
concepts or mathematical sets: these are text, number,
integer, real, etc...
- Powerful and safe: new control structures has been introduced with
scriptol.
Examples:
- composite if, that is both an if statement and a switch case with any kind of values.
- while let, that protects from infinite loop.
- for .. in array, or for .. in a..b, the simplest way to express ranges. - Simple: no symbols as -> or ::, just a dot in any case.
Adding 1 to x is just written: x + 1, and not x += 1.
No memory management required, executables have a garbage collector.
- PHP or JavaScript compatible depending on the compiler: you can program web pages in Scriptol, your code is converted to PHP and all PHP functions may be used. The same for JavaScript.
- Portable, run on any Node.js or PHP compatible platform.
Why use Scriptol?
Mainly for:
- Embedding natural and safe code inside HTML pages.
- Writing easily and quickly scripts, thanks to its high-level syntax.
- Prototyping, test quickly your program with the interpreter before to build a native executable.
- Building applications and Web applications: Scriptol may be integrated into rapid application development tools and can use cross-platform UI such as HTML 5.
- Processing XML documents such as makefile or configuration files.
- Program the intelligence of robots and simulations thanks to its high levels features such as goals, reactive formulas.
How to use Scriptol
You may open the console and type solj or solp or solc to view the options.
Using scriptol in a console
You can also configure a code editor to launch scriptol programs.
Choices of Scriptol that have been replicated in newer languages
Many innovations or choices of Scriptol has been taken over by newer languages​​, which so help to ease programming.
- A global variable name can not be reused in a local block in Scriptol. Dart (2011) triggers a warning in this case.
- Joint use of dynamic and statically typed variable. Now also in Dart, TypeScript, Julia and all new languages.
- Pattern matching (switch, if) using different kings of tests. This is reflected in Go.
- The removal of parenthesis around conditions in if or for, is taken over by Go and Swift.
- Semicolon is a statement separator in Scriptol. But it is useless when there is an end of line code. The same for Go.
- Unlike Python, which represents a range by ":" like Algol, Scriptol uses the classic typography: "..".
This is now the case for many new languages, for example Rust and Swift.
This symbol was already used by Pascal (1970), Ada (1995), Ruby (1995), this choice now prevails. Since Pascal succeeds Algol W, it must be an improvement. - The Scala language integrates XML in the source like scriptol.
JSX from Facebook extends also JavaScript with XML and compiles to JavaScript or interpret the XML. - Reactive programming and the react keyword has been taken by Red 0.6.1 (Red is derivative of Rebol).
Licences
The Scriptol to C++ compiler is under the Mozilla
1.1 licence.
The interpreter and compilers provided on scriptol.com and scriptol.fr
are free even for building commercial programs. Anyone may write a compiler for the langage.