In early 2019, we started on a new project within the Elements compiler, code-named "Gold." About a year later, we're now happy to announce the official availability of RemObjects Gold, our fifth and latest addition to the family of programming languages supported by Elements.
Elements started out as pure Oxygene (our modern take on Object Pascal). Over time, we've added support for C#, Swift and Java (the language). All of these languages could be mixed and matched within a single project, and any project could be built for one of the many platforms Elements supports — from .NET and Android to macOS/iOS to native Windows, even Linux WebAssembly and embedded systems.
Google's Go language was first introduced in 2013, and has a thriving community creating many great projects — including reusable libraries — in Go, with a strong focus on server-side code and native Linux and Windows targets. Go is a great language for server development, with asynchronous features such as "go routines", and many more. Go is great, but it also lives in a niche — it has no classes, which makes it unsuitable for GUI development with the most common frameworks, and it is tied to its native compiler — which can be a boon, but also a hindrance.
With Gold, we're combining the best of three worlds: The full syntax and power of the Go languages, available on all platforms supported by Elements (most notably this adds .NET, Java, Android (SDK and NDK!), iOS, and WebAssembly), and full access to the rich OOP-based APIs available on these platforms.
And it's rounded off by great IDEs, for a superb development and debugging experience.
What does that mean?
Let's digest this in smaller steps.
First, the Elements compiler now understands Go. No matter what type of project you have, if you click File|New, and add a
.go file to it, you can start coding. And as with all our languages, your Go code lives in the same project space as the rest. Your C# or Swift class can use structs implemented in Go and call your Go methods and – most importantly – your Go code can see the rest of your project and interact even with classes you wrote in Oxygene, C#, Swift or Java. It's all one big happy family.
Of course, that also means you can add any existing
.go files (or whole libraries) you might have.
Second, this works for any platform supported by Elements — not just the "native" platforms already supported by the official Go compiler. You can use the Go language in your .NET, .NET Core or ASP.NET projects. You can use it in your Android projects, your Cocoa projects for iOS or macOS, or even for WebAssembly.
Third, like the other languages, Go has full access to the riches of the platform — be it the full range of the .NET Framework's APIs, or all the wonderful SDKs that the Apple platforms provide, from AppKit and UIKit to MapKit, CoreML, you name it. Everything is directly accessible from your Go code, a simple
import "ARKit" away.
Go works in all three Elements IDEs — whether you're using our own Fire on the Mac or Water on Windows, or using Visual Studio — you get the full development experience, from the smart editor to great integrated debugging.
Fire and Water are lightweight yet powerful IDEs created bespoke for the Elements languages. Whether you want to work in pure Go on one of its traditional platforms (say, Linux Server dev), or mix languages or platforms, they will give you a responsive working environment that never gets in the way, with a intelligent editor features, integrated testing and error reporting and even remote debugging.
Go is not just a language, Google's standard Go implementation also comes with a vast library of types and APIs that are useful in day to day Go development — anything from complex numbers over encryption to a secure HTTP and network stack.
We're happy to announce that we have been able to port this library in its entirety for the majority of Elements platforms, meaning that you not only have access to the Go language (which is available for all platforms), but also the entire base library — and the eco-system of third party open source projects that builds on top of it.
libGo is supported for the following platforms:
- .NET (including ASP.NET, .NET Core and .NET Standard 2.0+)
- Windows (native)
- Linux (native)
- macOS, iOS, tvOS (when using our new Island platform backend)
- Android NDK
(Most noticeably missing here is the Java platform; unfortunately the constraints put in place by the JVM are too strict to get libGo to build for the JVM).
What's great about libGo being available for all the platforms listed above is that it is instantly available to all languages. Even if you are never planning to write a single line of Go code yourself, you can now use, for example
go.regexp from your C# code on iOS or your Swift code on .NET!
Here are the key highlights that Gold has to offer:
If you're Go developer:
- Take your Go code to new platforms like .NET and Cocoa.
- Mix C#, Swift, Java or Oxygene (Object Pascal) code into your Go project.
- Get a great IDE for working on Go projects, even for the traditional targets: native Linux, Windows and macOS.
If you're not a Go developer (yet):
- Use APIs from the vast libGo base library for your existing projects
- Get access to the majority of open source Go libraries to be used natively in your projects
- Add Go code to your projects
Gold is available now in the latest builds of Elements (10.0.0.2485 or later). It is included at no extra charge for existing and new Elements subscribers. Elements is available for new users at $799 and includes support for all (now) five languages and all platforms. Go is available standalone for $299 (which also supports all platforms).
Of course, a free 30 day trial is available, as well.
Read more about Gold, and Elements in general, at elementscompiler.com/gold.