There are differences in scope, but I think most people like arrow functions mostly because of the syntactic sugar.
> On Nov 15, 2017, at 12:02 AM, OmPrakash Muppirala <bigosma...@gmail.com> > wrote: > > On Tue, Nov 14, 2017 at 1:49 PM, Harbs <harbs.li...@gmail.com> wrote: > >> Cool. >> >> I have not been following WASM very closely. >> >> As an aside: >> It would be really cool if we could make the compiler understand arrow >> functions for ActionScript. >> > > Hmm, the point of the arrow function in ES6 is to not have a different > `this` object than the enclosing execution context. I thought all > ActionScript functions already behave that way. > > Unless we want the shortcut definition capabilities like > var square = x => x * x; > > Thanks, > Om > > >> >>> On Nov 14, 2017, at 11:44 PM, Erik de Bruin <e...@ixsoftware.nl> wrote: >>> >>> Yes. WebAssembly only a month or so ago made it into the bleeding edge >>> versions of Safari and Edge, completing it's 'penetration' of the major >>> browsers. ES6 was there "a long time ago", so basically if we're doing >>> WASM, we're good on whatever JS or Web API we want to use ;-) >>> >>> EdB >>> >>> >>> >>> On Tue, Nov 14, 2017 at 10:35 PM, Harbs <harbs.li...@gmail.com> wrote: >>> >>>> I’m curious about the context of this script. >>>> >>>> Will all environments where this is being run understand ES6 arrow >>>> functions? >>>> >>>>> On Nov 14, 2017, at 5:54 PM, erikdebr...@apache.org wrote: >>>>> >>>>> This is an automated email from the ASF dual-hosted git repository. >>>>> >>>>> erikdebruin pushed a commit to branch develop >>>>> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git >>>>> >>>>> >>>>> The following commit(s) were added to refs/heads/develop by this push: >>>>> new 3dc37ce Add ‘glue’ utility script to allow WASM to be loaded in >>>> HTML >>>>> 3dc37ce is described below >>>>> >>>>> commit 3dc37ceb90c20be37639068061dba14b79e9461b >>>>> Author: Erik de Bruin <e...@ixsoftware.nl> >>>>> AuthorDate: Tue Nov 14 16:54:13 2017 +0100 >>>>> >>>>> Add ‘glue’ utility script to allow WASM to be loaded in HTML >>>>> >>>>> Signed-off-by: Erik de Bruin <e...@ixsoftware.nl> >>>>> --- >>>>> .gitignore | 3 +++ >>>>> wast/resources/glue.js | 11 +++++++++++ >>>>> 2 files changed, 14 insertions(+) >>>>> >>>>> diff --git a/.gitignore b/.gitignore >>>>> index a32c5ce..64c80a8 100644 >>>>> --- a/.gitignore >>>>> +++ b/.gitignore >>>>> @@ -141,3 +141,6 @@ vf2js/frameworks/js/ >>>>> #FlexJS generated files >>>>> frameworks/js/FlexJS/generated-sources >>>>> manualtests/FlexJSTest_SVG/bin >>>>> + >>>>> +#WAST generated files >>>>> +/wast/examples/HelloWorld/bin >>>>> diff --git a/wast/resources/glue.js b/wast/resources/glue.js >>>>> new file mode 100644 >>>>> index 0000000..fe66877 >>>>> --- /dev/null >>>>> +++ b/wast/resources/glue.js >>>>> @@ -0,0 +1,11 @@ >>>>> +function fetchAndInstantiate(url, importObject) { >>>>> + return fetch(url).then(response => >>>>> + response.arrayBuffer() >>>>> + ) >>>>> + .then(bytes => >>>>> + WebAssembly.instantiate(bytes, importObject) >>>>> + ) >>>>> + .then(results => >>>>> + results.instance >>>>> + ); >>>>> +} >>>>> >>>>> -- >>>>> To stop receiving notification emails like this one, please contact >>>>> ['"comm...@royale.apache.org" <comm...@royale.apache.org>']. >>>> >>>> >>> >>> >>> -- >>> Ix Multimedia Software >>> >>> Jan Luykenstraat 27 >>> 3521 VB Utrecht >>> >>> T. 06-51952295 >>> I. www.ixsoftware.nl >> >>