We are thrilled to announce the release of Elements 11, and with it its most  interesting new feature: the introduction of Mercury as the sixth language supported by our compiler and tool chain.

The goal of Mercury is to breathe a new lease of life into the Visual Basic.NET language — giving it a future beyond the point where Microsoft has stopped its development, bring to it new features and support for modern (current and future) .NET platforms and platform features, and to also take it beyond just the .NET platform to all the platforms supported by Elements.

A Visual Basic Language That Keeps Getting Better

Microsoft has stated that they do not plan to develop and extend their Visual Basic.NET language further, neither to add new features in general, or even to keep it up to date and compatible with C# and .NET platform capabilities, as those get enhanced.

We created Mercury, in part, to provide an alternative for that. As it is shipping now, Mercury not only is 99.9% compatible with Visual Basic.NET as it stands, but it already adds a wide range of language extensions and support for C# 9.0 features that will make the VB developers lives easier – from support for pointers and unsafe code, over lazy properties to C#9's new records, and more.

It also gains a bunch of language capabilities "for free" by virtue of being part of the Elements compiler tool chain, such as support for Aspect Oriented Programming (essentially, fancy attributes that can affect your code et compile-time), or mapped types.

And this is just the beginning. Over the coming months and years, we will continue innovating on the language and add more exciting new features and capabilities to it – based on our own ideas, as well as of course user feedback and request (directly to us, and from the VBLang community).

And we will keep it up to date with where .NET and C# are going, of course.

Existing VB projects can easily be converted with a single click, and will build and work with no or very little adjustment. And can then take advantage of new language capabilities, immediately.

Support for .NET 5.0, 6.0 and Beyond, & Keeping up with C# 9.0 and Beyond

As with the language, we're also committed to what is – for right now at least – the most important target platform for VB developers: the .NET runtime.

As .NET (and C#) evolve, Mercury will keep being updated to support the latest platform versions and features, and also to be kept compatible with features added to new versions of C#, as it evolves. This means Mercury will be ready to target .NET 6, 7, 8, use APIs created in C# 10, 11 12, and so forth.

More Platform

Another exciting aspect of Mercury is that it takes the language beyond just the .NET platform ecosystem. While Mercury shines as a true successor to VB.NET for existing and new .NET applications, it does not end there.

Mercury brings the VB language natively to additional platforms — without reliance on the .NET, Mono or Xamarin runtimes or compatibility layers.

With Mercury, you can use your VB language to build projects for

  • Native ("Win32") Windows
  • Native Linux
  • WebAssembly
  • Android, both via the Java-based Android SDK, and the native Android NDK
  • Apple's platforms: iOS, iPadOS, macOS, tvOS and watchOS

Windows

With Mercury, you can now directly target the native Windows APIs – on the same level and with the same performance characteristics as you would from, say, C or C++. No managed runtime, direct memory access, CPU-native code for i386, x86_64 and (very soon) arm64 that runs directly on the metal.

It's not something you would use use all the time, but it's nice to know you can fall back to a lower level where needed, without having to revert to using C!

Linux

The same is the case for Linux. Of course .NET-based applications can run on Linux, via Mono or .NET Core. But Mercury also lets you write truly native Linux code – again, on the same level as you would with C or C++.

WebAssembly

The web platform is covered well by ASP.NET on the server side, but what about the client? With Mercury's WebAssembly support you will write VB code that runs directly in the browser, with full strongly-typed access to your HTML, the DOM, the browser's JavaScript APIs, and even with full native event support using VB's Handles syntax. All that without the overhead of the .NET runtime as you have with Blazor.

Android & Java

Mercury also allows you write apps for Android (using the Java-based SDK that most Android apps are built on, but also the more lower level C-based native Android NDK). The entire Android ecosystem and APIs are at your fingertips, without the overhead of a Xamarin compatibility layer. And you can can target the standard Java SDK for desktop and server apps, as well!

Cocoa

Finally, the same is the case for Apple's platforms. Mercury lets you create projects for all of Apples computers and device, once again putting your code directly in touch with the great Cocoa APIs provided by Apple, without unnecessary wrappers or compatibility layers. Mercury even extends the language to make it intuitive to work with Cocoas unique method naming conventions.

Development Environments

Visual Basic.NET developers can switch to Mercury and continue using it in the comfort of Visual Studio, the IDE they already know and love.

Alternatively, Mercury also comes with its on native and light-weight IDEs both for Windows and also the Mac – called Water and Fire, respectively. These IDEs are designed form the ground up for Mercury and the Elements compiler tool chain.

All three IDE options support all the features and target platforms of Mercury.

Mixing C# and VB in the Same Project

Mercury is part of a language family and compiler tool chain that has been stable and growing for over 15 years now. One of the many advantages of the Elements compiler is, that it allows you to mix and match any of its six supported languages in your project. That means if you ever have a snippet of C# code you just want to use in your project, without translating it, you can now do so – without needing a separate class library project for it.

This is also true for the other four languages: Oxygene (Object Pascal), Swift, Java and Go.

Get Mercury Now

After over a year of development and an extensive beta program, Mercury is available now, standalone or as part of the full Elements bundle. You can evaluate Mercury for free without any technical limitations for 30 days. Full licenses for Mercury are available as monthly or yearly subscriptions, starting at $49/month.