Elements 10 Highlights 1/2018

Over the past month we've shipped five new update builds for Elements 10, and we're hoping that today's build will be promoted to "Stable" next week, making .2249 the first build of Elements 10 to then be available publicly to users without an active subscription – including for trial users, and those using the Swift language for free.

I want to take a quick look at some of the highlights of what new features we've included since the begining of the year, starting off with today's build .2249.

Class Contracts (.2249)

Class Contracts have been an amazingly useful feature for Oxygene since version 1.0 back in 2004, allowing you to document and enforce pre- and post conditions as well as invariants for your classes in code.

Fourteen years later, build .2249 is bringing two big improvements to the feature:

  1. require conditions on methods are now not only enforced at runtime (for debug builds compiled with assertions on), but where possible also checked by the compiler at compile time, resulting in immediate warnings and errors. Passing 0 to a method that's encoded with require a > 0? The compiler will now tell you!

  2. previosuly Oxygene-only, we've now brought the feature over to the other three languages, so you can now add class contracts to your C#, Swift of Java code, as well:

public func divide(_ a: Float, by b: Float) -> Float {
    __require {
        b != 0
    return a / b

We hope you'll find that useful!

Dynamics for WebAssembly (.2249)

We shipped WebAssembly support (more on that below) just two short weeks ago. Today's build adds support for dynamic types to Island, which is particularly interesting to WebAssembly because it makes direct interaction with JavaScript objects just that much more streamlined. You can now (try to ;) call any methods your JavaScript and DOM objects might support directly, as if they were native methods. The dynamic type and the WebAssembly class in Island RTL take care of the rest under the hood.

Default Interface Implementations (.2249)

Interface members can now provice an optional default implementation. Classes implementing the interface will automatically get the default implementation (much like inheritance), unless they choose to implement the method explicitly.

  ILogger = public interface
    method Log(aMessage: String);
    method Log(aMessage: String; params aParameters: array of Object);
      Log(String.Format(aMessage, aParameters));

Integrated Help (.2247)

New last week, we've brought integrated online help to Fire and Water. The IDEs now include a comprehensive help index not just for the core Elements documentation, but also our other library products and the core platform documentation sites (Cocoa, Java, Anroid and .NET). Hit F1 on any indentifier, and you're taken directly to the appriate documentation page, whether ours or in Apple's, Oracle's, Google's or Microsoft's doc sites.


In Fire, the help viewer is also integrated directly with the IDE, adding a fifth tab to the side bar where you can browse the docs actively. (In Water, help topics launch in your external browser of choice – frankly because there are no good options for embedding a browser view in a Windows app that does not suck or add a lot of bloat.)

XAML Code Completion (.2247)

Also new last week, we've added full compiler-powered Code Completion support for XAML to both Fire and Water. This makes it much more joyful and productive to work on your WPF apps – even in Fire, on the Mac. Speaking of which...

XAML Support in EBuild (.2241)

...earlier in January, we also rolled out full support for buildig WPF apps in EBuild, without dependency on Microsoft's proprietary XAML tool chain. That means you can now, for example, work on and build WPF apps on a Mac.

WebAssembly (.2241)

Already covered in detail in the previous blog post, build .2241 expanded the Island platform with support for bulding WebAssembly modules, letting you use your favorite langage to build code that runs right in the browser and that extends and interacts with JavaScript and the DOM. Cool stuff!

InstanceType on all platforms (.2241)

In build .2241 we also brought support for InstanceType, originally a Cocoa-only feature, across to all platforms.

InstanceType is a small but nifty feature that lets you write override methods that return a value of the "current type" to be more strongly typed. The docs topic on the type has a good and extensive example that's worth checking out.

Profiler Integration (.2239)

The first build of the year, .2239, added IDE-integrated cross-platform performance profiling to Fire and Water. What we've done is take a small open source aspect we've had for a while but that was .NET-only, and made it cross-platform, so that the same profiling code can now run regardless of whether your code is .NET, Java, Cocoa or native Island. And we've extended the IDE to automatically load in the profiling results, and let you browse and view them:

And so much more

And these are just a few of the highlights from last month; there's lots of smaller tweaks and improvements in all areas that you can find in the change logs.

Can't wait for what we'll have next week...

marc hoffman

marc hoffman

Chief Architect and CEO here at RemObjects Software. Project Manager for Elements and lead developer of Fire, our awesome new development environment for the Mac.

Read More