January 22, 2017

I hereby introduce to you Sling, a general-purpose object oriented programming language that is meant to be used for all kinds of software development purposes, targeting multiple platforms and different execution environments. Sling by design encourages productivity, maintainability and well formatted, well structured source code.


In the beginning, there was C, C++, Java and C#. And Python. And Ruby. And Visual Basic. Lua, FoxPro, RPG. Then there was Vala, VX and the Eqela language, then EQ. Recently, there was Swift, Dart and Rust and Go and a bunch of other languages, although we were not really influenced by them. But the evolution did not end there. Now there is Sling.

For a quick reference, Sling code looks like this (and don't worry, links for further info are available below):

class:

func main(args as array<string>) static as int #main
{
	PRINT "Hello World"
	return 0
}

Sling evolved from the EQ programming language, also simply known as "the Eqela programming language", which we also developed and first released back in 2012. Many programs have been written in EQ by many people over the years for different purposes. For those who have previously developed in Eqela or EQ, you will hopefully find the Sling environment familiar, but perhaps more powerful.

The design and development of Sling started first and foremost in order to create a language for our own use in our development projects. The intention was, has been, and continues to be, to create a language and a development environment that would make us more productive as developers and that would help us increase the quality of software and reduce errors. As a parallel objective, we also wanted to create something that is easy and sensible to learn, and that would encourage learning and absorption of object oriented and functional programming concepts in particular. In practice, this has translated to a particular language design focus towards trying to lessen or eliminate repetitive or redundant typing, highlighting logic and consistency and in coming up with different ways of automatically providing structure to code that allows the language and the compiler to guide and assist us as programmers towards the correct direction while developing.

As far as language characteristics go, Sling is strongly typed, and one of the compiler's roles is to enforce type safety. Memory management is automatic from the perspective of the programmer, but whether it is by means of garbage collection, reference counting or through other means, the language does not stipulate. Also, from the perspective of the language specification, a Sling program may be interpreted, executed as bytecode, compiled to machine code, or be executed through some other means. No particular restrictions or expectations are placed on an executing virtual machine either, if one is used. All function calls and symbol references are checked and bound during compilation, which is meant to help us ensure we are maintaining a fully coherent codebase.

In terms of overall features, Sling includes the usual features of the languages of our time, including (but not limited to) classes, interfaces, inheritance, polymorphism, abstract classes, generic types, constructors (with or without parameters), destructors, methods with overloading and default values for function call parameters, various control structures, modules, namespaces, arrays and dictionaries with corresponding literal representations, etc. In addition, Sling also includes things that are less usual, such as support for different programming languages, magical variables, object oriented macros, built in support for text templates, custom modifiers in various code elements, syntax support for embedded documentation, source code based task or todo list management, and more. And we will obviously continue to add more.

Despite the strict typing and compile time checking, the way the language is used in practice will often feel very dynamic, despite the strict compiler controls. In essence, we would want to aim for maximum flexibility in terms of programmer productivity, while enabling the compiler to strictly enforce and maintain the structural and even logical correctness of the program.

The intention was and is also to produce a general purpose language. Sling is not meant just for web development or the development of backend software. Or games, or business apps. Or mobile apps. Rather, it is meant to be used to develop for all those, and more. Including embedded development and IoT devices.

Furthermore, also in keeping with the true Eqela spirit, the intention is to be compatible with everything, or with as much as is possible (which we hope will mean everything). Indeed, Sling is meant to be compatible with other programming languages in terms of structure, interface and essence. This means that functions, variables and constructs of other programming languages can be used directly from Sling, and code in other languages can also be "embedded" within Sling code. In terms of essence, all code written in Sling can always also be fully represented in other languages, and as such we would want to see it in such a way that a Sling program can be considered and used as a Java program if so desired, for example, or as a C# program. Or as a program written in some other, perhaps arbitrary language. The Sling language is meant to be translated, and the translated code is meant to be pretty and human readable, perhaps even more so than corresponding code that would have been written manually by a human programmer.

The reference compiler for Sling is built on top of the SAM compiler framework of Eqela (which is also used to power the Eqela Transcend technology solutions, among other things). The community edition of SAM ("SAM CE"), which includes the Sling compiler features, can be downloaded from the Eqela website:

Sling is not intended to remain as a single compiler implementation, however. God willing, we also have plans and designs to implement Sling front-ends also for other, pre-existing compilers.

While we originally designed Sling having ourselves in mind, we hope that it will also bring blessings to others in this world. In that frame of mind, I would also like to dedicate this work and the Sling language itself in honor of the late Ronald "Andrei" Antonio, master Yoda of Job and Esther Technologies, who I hope will continue to live on among us through the language that he helped design and develop.

With that, I wish happy hacking to everyone. Proceed here to read more:

(Note: As always, the documentation continues to be a work in progress. Many of our tutorials will still need to be converted to Sling. Please follow also my Twitter feed or that of @eqdntech for updates.)

If all you want is code, check out the source code of the Jkop framework. It's fully written in Sling (and includes everything from console to GUI to gaming to backend to web services):

And lastly: In case you were wondering, this very website is also implemented in Sling, running on the Sympathy web service framework:

It's all Sling now. Happy 2017 everybody!


Share this article: