Slag
About
Slag is an elegant, powerful, and efficient statically-typed, object-oriented language designed to be the high-level language of choice for game engines and frameworks. Light and portable, its virtual machine can be easily integrated with any C++ program. Slag's semantics (nature and purpose of operations) are similar to those of Java and C# while its clear and concise syntax resembles a blend of Java and BASIC.
Many languages have attempted to improve programmer efficiency by using minimalistic names, cryptic symbols, and implicit operations while leaving a fundamental problem untouched: that of legacy organizational patterns requiring tedious, repetitive coding. Slag's approach is one of ergonomic simplicity, where simple, explicit commands are paired with the removal of repetitive and redundant operations. Slag offers the following benefits:
- Ergonomic programming
Similar to how a garbage-collected language abstracts memory management and allows the programmer to operate at a higher level, Slag abstracts away tedious operations and enables even more sophisticated programming - all the while remaining an efficient, statically-typed language underneath. Why type "ArrayList<String> names = new ArrayList<String>(4);" when you can type "local String[] names(4)"? Even with its verbose keywords ("forEach ... endForEach") and Java-style semantics, a typical Slag program is 30% to 60% smaller than its Java equivalent in both lines of code and number of characters typed. - A wish list of features
Slag was designed from the beginning to be a total replacement for C++and Java for many common applications. Its list of features reads like a dream: full inheritance support, aspect-oriented programming, transparent access methods, standardized Reader/Writer I/O architecture, a rich set of collections, a slew of both new and familiar control structures, true templated types (including lists of primitives), exception handling, simple string formatting, default parameters, and much more. - Small, self-contained, and portable
For development: Slag tools have a small footprint (~1MB combined for the compiler, vm, and standard library source code) and can be embedded in each project's development directory, meaning that if you download an existing Slag-based project on a new computer, everything you need to compile and run can be already included.For distribution: any standard library calls used in a Slag program are compiled into the output bytecode. Anyone can run a compiled Slag program without having any sort of "Slag language platform" installed. Compiled Slag programs may be run on any platform by porting the C++ virtual machine or by cross-compiling the Slag program to straight C (or Java, etc.)
The Slag compiler, virtual machine, standard library, and other language tools are freely available in both source and executable form (coming soon). Slag may be used commercially or non-commercially, either in the creation of standalone programs or as part of other projects.
Slag is the language of the Plasmacore 2D game development framework.
- Login to post comments

