⬆️ ⬇️

AliveScript - a programming language for children 12+

AliveScript is a graphical (visual) programming language that is compiled into JavaScript. It uses only simple and child-friendly features of the JavaScript language, and only strengths, and only strict mode. This is the core (hardcore) js-programming, the maximum minimalism - only 50 graphic elements of which the program consists.



logo Script



AliveScript is a JavaScript visualization.



I have identified a simple subset of the JavaScript language that I use in my work. AliveScript is fully consistent with the JavaScript language, in contrast to languages ​​such as CoffeeScript and TypeScript. AliveScript is pure vanilla javascript adapted to work on the touchscreen. This article will help beginners to understand the essence of this language, and will accelerate the onset of enlightenment.

')

It is possible to master the Alive Script in one day, but it takes several years to gnaw the granite of science, because



you can not just take it and become a programmer!



Historical context



In the beginning, in 1995, this language was called Mocha, because programmers love coffee. It was then renamed LiveScript, the server version of the language was to be called LiveWire. After that, the name suddenly changed to JavaScript, because then Java was a buzzword. The standardized version of the language is called ECMAScript. Recently, Jeremy Ashkenas created the same name LiveScript, which is compiled into JavaScript, previously it created CoffeeScript.







From the bourgeois name ZhavaSkript comes the Russian name ZhivoSkript. I am not a domestic amateur harsh amateur engineer, I speak and write code in Russian. Splash Script is a native Russian graphical programming language that I created primarily for Russian-speaking children. I am not interested in the usual standard professional web development, and its problems, dogmas and holy wars - please understand and forgive.



JavaScript redesign



I love JavaScript - for the amateur there is no language easier and more efficient, this is Lisp in the skin of Xi. For 22 years, web programming has matured enough, and yet the era of comfortable web development has arrived, for example, you can typeset tables and text with flexboxes . For complete happiness, it remains to wait for WebCL or WebGPU and WebAssembly. 12+ is an approximate age when children are usually able to start learning programming, and this is the level of complexity of the tool I need.







Language syntax and code samples



The live script is so simple that the screenshots are clear and without explanation.



A program is a block sequence of actions and other blocks. Empty program:







Comment and blocks. Blocks can be named:







Address binding actions with values:







Deleting an element of an object and an element of an array:







Branching IF-ELSE, in the condition - address, comparison or verification of the existence of a property:







Branching-options SWITCH-CASE:







WHILE, DO-WHILE, FOR, FOR IN cycles:







Simple values. Four types of strings: with single and double quotes, for id-names and for css-class names:







An object:







Array:







Subroutine (function):







Call-run subroutine:







Source: https://habr.com/ru/post/332574/



All Articles