Human Oriented Language

 
Aristote. You can't acomplish great things with small ideas

 

Human orientation of Scriptol compared to older programming languages

The language has been designed mainly with the goal to be near the human thought. I had applied the Descartes' method to search for the truth, that is asking for the reason of each feature of classical languages. If a thing has been used only for a reason that no longer exists (the low speed of computers for example), thus this feature is pulled out of the language.
Contrariwise, I want not to use new syntax only to change the language, I prefer to keep what programmers are used with if this works well. For example, I have exhumed the "nil" keyword from the very old (40 years old!) Lisp language, because "nil" is just what I need, and I want not to invent new things only to be different.

Number and text

Previous languages use for variables such types as float, string, char, short, etc... All that coming from the epoch of computer having 48 k bytes memories. Scriptol uses simply number and text, and also real or integer to distinguish numbers.
However it doesn't use untyped variables (but when dealing with dynamic arrays), as that causes no deterministic programs and prevents the compiler to control the right use of variables.

Pure statements: no assignment inside expressions

The statement if(x = y) in C++ lets y assigned to x and tests if x is 0. In Scriptol, this tests is x equals y. The == double operator is not used by Scriptol.
C, then Java, Php and C#, allow to merge a condition and an action. Ex: if (A = B + 1) then .... In human language: "if non zero is A assigned the sum of B and 1, then... "
A such merging of ideas in not allowed in Scriptol.
Statements are expressions in C and successors, not in Scriptol.

Augmented assignment

The statement x = x + 2, is written x + 2 in Scriptol. This is the way human thinks. (Ex: "my car has moved one km", rather than:  "my car has moved from the current place to the current place plus one km".)

Operators and symbols

Symbols have just one sense Scriptol and are not used for different operations, unlike other languages.

Pattern-matching

Thanks to special control structures, composite if and do case - never implemented before - Scriptol allows to structure the code in a way that transposes directly the human thought.
The scan control structure, with [] to designate the current item, is also a direct transposition of human mind, never implemented before.

Semicolons

It has been said that a program must use semicolons because we use such punctuation when we are writing. One doesn't put semicolons into musical partitions however...
The real purpose of semicolons in programs, I believe, is to allow to split lines without confusing the compiler. But the modern Scriptol compiler is able to recognizes splitted lines and thus, doesn't need for another terminator when a statement is terminated by the end of the line. Scriptol needs for semis only to separate statements on a same line.

Multiple returns

For some functions, it is obvious that they must return several values at once. For example, the components red, green, blue of a color, or the x and y coordinates of a point... And so, to match the way human thinks, it should be possible to assign several variables at a function call:
  x, y = getCoordinates()
  red, green, blue = getRGB()
 Scriptol (like some other modern scripting languages) does that.