Difference between revisions of "Andromeda"

From HIVE
Jump to navigation Jump to search
(→‎Libraries: added links to astdlib)
(added longer intro, cleaned up goals section, added design paradigm section, leaving language features section empty for now since big Andromeda update is due soon)
Line 1: Line 1:
Andromeda is an extension language for Blizzard's Galaxy language. The main goal of Andromeda is to extend galaxy's syntax where it shows missing things and to add object oriented paradigms to galaxy.
+
Andromeda is an object-oriented, imperative scripting language that extends Blizzard's [[Galaxy|Galaxy language]]. It was designed to be an extension to Galaxy in the manner that vJASS was an extension to Warcraft III's JASS scripting language. Andromeda is implemented as a superset of Galaxy, meaning that all syntactically valid Galaxy code is also syntactically valid Andromeda code (the only exceptions are cases where the Galaxy code uses one of Andromeda's keywords). Moreover, Andromeda is compiled directly to Galaxy, allowing custom maps that use Andromeda to be played on [[Battle.net]] without the use of third-party mods.
  
== Main goals ==
 
  
* Being totally compatible to galaxy, allowing for the use of 'legacy' galaxy code (all galaxy code also compiles with the Andromeda compiler, but might get optimized)
+
==Goals==
* Providing object oriented paradigmns (Classes, Interfaces, Inheritance, Generics and even reflection (partly, as much as possible with galaxy code), ...)
+
Andromeda's main goals are to:
* Deep syntax analysis for finding possible errors (dead code, unused variables / functions, ...)
+
 
* Comprehensive Code optimization (function inlining, removing comments and whitespace, resolving constant expressions at compile time, ...)
+
*Maintain compatibility with native [[Galaxy]] code
* Convenient constructs that are found in most languages but missing in galaxy (++/--, for loop, for each loop, casts, block comments, overloading ...)
+
*Support object-oriented programming (OOP)
* Help for debugging, by allowing to override native (and thus track) function calls and other debugging stuff (we are even working on a debugger for it).
+
*Support comprehensive and useful reporting of compile-time errors
* Preprocessing for adding some code in debug mode for example (#ifdef, #define, ...)
+
*Introduce common programming features absent from Galaxy
 +
*Reduce the need for unnecessary and boilerplate code
 +
*Produce optimized code in the target language when compiled
 +
*Provide simple and effective methods for code debugging
 +
 
 +
==Design Paradigms==
 +
Andromeda is an object-oriented, procedural, and imperative scripting language with additional support for generic and (limited) reflexive programming. First and foremost, Andromeda adheres strictly to the tenets of Object-Oriented Programming (OOP). Procedural programming, while still supported, is included mainly for compatibility purposes with [[Galaxy]]. In Andromeda programming, an emphasis is placed on viewing the program as a collection of objects, each with its own state. Code is built around querying objects to determine their states and manipulating objects to change their states. This allows for the adoption or expansion of programming strategies such as:
 +
*Encapsulation
 +
*Modular Design (also known as Reusability)
 +
*Extensibility
 +
*Orthogonality
 +
 
 +
==Language Features==
 +
Andromeda retains all of [[Galaxy]]'s syntax features while adding new ones. Most of the new syntax is inspired by or directly borrowed from the Java programming language.
 +
 
 +
===Source Code Structure===
 +
===New Syntactical Features===
 +
===Encapsulation===
 +
===Classes===
 +
===Polymorphism===
 +
===Generics===
 +
 
  
 
== Links ==
 
== Links ==
Line 19: Line 39:
 
== Libraries ==
 
== Libraries ==
 
*[http://sc2mod.com/wiki/index.php?page=Article&articleID=81&languageID=1 User Interface]
 
*[http://sc2mod.com/wiki/index.php?page=Article&articleID=81&languageID=1 User Interface]
*Andromeda Standard Library (astdlib)
+
*[[Andromeda Standard Library]] (astdlib)
 
**[http://code.google.com/p/astdlib/source/checkout Source Code]
 
**[http://code.google.com/p/astdlib/source/checkout Source Code]
 
**[http://sc2mod.com/board/index.php?page=Board&boardID=45 Talk]
 
**[http://sc2mod.com/board/index.php?page=Board&boardID=45 Talk]

Revision as of 05:59, 2 December 2010

Andromeda is an object-oriented, imperative scripting language that extends Blizzard's Galaxy language. It was designed to be an extension to Galaxy in the manner that vJASS was an extension to Warcraft III's JASS scripting language. Andromeda is implemented as a superset of Galaxy, meaning that all syntactically valid Galaxy code is also syntactically valid Andromeda code (the only exceptions are cases where the Galaxy code uses one of Andromeda's keywords). Moreover, Andromeda is compiled directly to Galaxy, allowing custom maps that use Andromeda to be played on Battle.net without the use of third-party mods.


Goals

Andromeda's main goals are to:

  • Maintain compatibility with native Galaxy code
  • Support object-oriented programming (OOP)
  • Support comprehensive and useful reporting of compile-time errors
  • Introduce common programming features absent from Galaxy
  • Reduce the need for unnecessary and boilerplate code
  • Produce optimized code in the target language when compiled
  • Provide simple and effective methods for code debugging

Design Paradigms

Andromeda is an object-oriented, procedural, and imperative scripting language with additional support for generic and (limited) reflexive programming. First and foremost, Andromeda adheres strictly to the tenets of Object-Oriented Programming (OOP). Procedural programming, while still supported, is included mainly for compatibility purposes with Galaxy. In Andromeda programming, an emphasis is placed on viewing the program as a collection of objects, each with its own state. Code is built around querying objects to determine their states and manipulating objects to change their states. This allows for the adoption or expansion of programming strategies such as:

  • Encapsulation
  • Modular Design (also known as Reusability)
  • Extensibility
  • Orthogonality

Language Features

Andromeda retains all of Galaxy's syntax features while adding new ones. Most of the new syntax is inspired by or directly borrowed from the Java programming language.

Source Code Structure

New Syntactical Features

Encapsulation

Classes

Polymorphism

Generics

Links

Libraries