Difference between revisions of "Extensible Object Script"
(→Background) |
|||
Line 82: | Line 82: | ||
== Background == | == Background == | ||
− | ExtensibleObjectScript is a general purpose object-oriented programming ans scripting language. It is designed to be simple to learn, easy to use, yet still powerful, combining the convenience of a just-in-time interpreter with the features and reliability of the surrounding Java virtual machine | + | ExtensibleObjectScript is a general purpose object-oriented programming ans scripting language. It is designed to be simple to learn, easy to use, yet still powerful, combining the convenience of a just-in-time interpreter with the features and reliability of the surrounding Java virtual machine. Its origins trace to ObjectScript developed originally by Texas Instrument until the early 2000s. |
== Introduction == | == Introduction == |
Revision as of 05:02, 27 December 2022
Extensible Object Script | |
---|---|
Developer | Netroda Technologies, A. Zeneli et. al. |
Type | Scripting Language |
Licenses | Public Domain |
Initial release |
Dec. 1998 |
Current Version | 2.4 |
Platform | EOSRuntime (Java / Platform Independent) |
Origin |
|
Typing | Dynamic, Weak |
Influences | Java, ActionScript, JavaScript |
Extensible Object Script (short "EOS") is the Scripting language used for Systems Based on the Extensible Services / Server for Automation family. Extensible Object Script features Object mixing, caching, lambda expressions and strict/weak typing.
Extensible Object Script runs inside the ES/S-A Enviroment (Java-Based) and is compatble with Java Object (Objects extending java.lang.Object). As Java-Based Language (Processed by JJ and Apache BCEL) it is theoretically Plattform independent, as the runtime can be executed on any Java-capable platform.
Background
ExtensibleObjectScript is a general purpose object-oriented programming ans scripting language. It is designed to be simple to learn, easy to use, yet still powerful, combining the convenience of a just-in-time interpreter with the features and reliability of the surrounding Java virtual machine. Its origins trace to ObjectScript developed originally by Texas Instrument until the early 2000s.
Introduction
Extensible Object Script is a full featured object oriented scripting language, which combines the powerful features of a full blown programming language such as Java with the ease of use of a scripting language. It supports functions (which can be closures), classes, inheritance, synchronization (for multi-threaded programs) and garbage collection. Also, an ObjectScript program can take advantage of exising Java APIs by creating instances of Java classes, calling methods of Java objects, and even implementing Java interfaces or extending Java classes. As the Core of Extensible Services / Server for Automation is java based, Extensible Object Script integrates seamlessly.
Examples
// A Simple While-Loop var a = 0; while(true) { a++; if( a > 5 ) break; else continue; a = 10; // this line is never evaluated }
// Two For-Loops var arr = []; for( var i=0; i<10; i++ ) arr[i] = i; var sum = 0; for( var item : arr ) sum += item;
// Simple Recursion function fib(n) { if( n == 0 ) throw new Exception("Invalid Input"); else if( n == 1 ) return 1; else if( n == 2 ) return 1; else return fib(n-1) + fib(n-2); }
// Objects and Object-Mixing function Color() { public function setRGB( r, g, b ) { // ... } } function Shape() { // ... } function Square() extends Shape() { public function setSize( w, h ) { // ... } } /* derived class created using mixins: */ function ColoredSquare() { mixin new Square(); mixin new Color(); } var coloredSquare = new ColoredSquare(); coloredSquare.setRGB( 0xff, 0xff, 0xff ); coloredSquare.setSize( 25, 50 );