Hscript enhancement idea - inferring function declarations in anonymous structures

Currently, in hscript, and in Haxe itself, you can declare an anonymous structure to contain various functions with the function keyword:

var obj = {
    myFunc: function() {
        // do something
    }
}

However, even though this may be my impatience talking, I would rather like a short-hand version of this which would only be available in the context of an anonymous structure, like so:

var obj = {
    myFunc: () {
        // do something
    }
}

Where the parentheses before the curly brace indicates a function declaration rather than an object declaration if the parentheses were omitted. This could also apply in Haxe itself. I haven’t followed the Haxe 4.0 compiler features all that much, so maybe this is already in the plans, although I am curious what people think of this. Could this be a thing that happens in hscript (for which I would be happy to contribute a pull request) or perhaps be part of the core Haxe language as well? Thoughts?

Thanks.

Haxe 4 adds arrow functions, and they’re available in current preview builds. In fact, your code snippet is just missing the arrow to work with Haxe 4:

var obj = {
    myFunc: () -> {
        // do something
    }
}

I think it definitely makes sense for hscript to support arrow functions, since it’s official Haxe syntax.