W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2014

RE: =[xhr]

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Fri, 5 Sep 2014 12:47:34 +0000
To: "James M. Greene" <james.m.greene@gmail.com>, Robert Hanson <hansonr@stolaf.edu>
CC: David Rajchenbach-Teller <dteller@mozilla.com>, public-webapps <public-webapps@w3.org>, "Greeves, Nick" <ngreeves@liverpool.ac.uk>, "Olli Pettay" <olli@pettay.fi>
Message-ID: <4dd607b290b64803ae71826b7cac78ee@BN1PR05MB325.namprd05.prod.outlook.com>
FWIW I do not think ES6 modules are a good solution for your problem. Since they are not in browsers, you would effectively be adding a layer of indirection (the “transpilation” James discusses) that serves no purpose besides to beta-test a future platform feature for us. There are much more straightforward ways of solving your problem, i.e. I see no reason to go Java -> JavaScript that doesn’t work in browsers -> JavaScript that works in browsers. Just do Java -> JavaScript that works in browsers.

From: James M. Greene [mailto:james.m.greene@gmail.com]
Sent: Friday, September 5, 2014 05:09
To: Robert Hanson
Cc: David Rajchenbach-Teller; public-webapps; Greeves, Nick; Olli Pettay
Subject: Re: =[xhr]

ES6 is short for ECMAScript, 6th Edition, which is the next version of the standard specification that underlies the JavaScript programming language.

All modern browsers currently support ES5 (ECMAScript, 5th Edition) and some parts of ES6. IE7-8 supported ES3 (ES4 was rejected, so supporting ES3 was really only being 1 version behind at the time).

In ES6, there is [finally] a syntax introduced for importing and exporting "modules" (libraries, etc.).  For some quick examples, you can peek at the ECMAScript wiki<http://wiki.ecmascript.org/doku.php?id=harmony:modules_examples>.

A transpiler is a tool that can take code written in one version of the language syntax and convert it to another [older] version of that language.  In the case of ES6, you'd want to look into using es6-module-transpiler<http://esnext.github.io/es6-module-transpiler/> to convert ES6-style imports/exports into an AMD (asynchronous module definition)<https://github.com/amdjs/amdjs-api/blob/master/AMD.md> format.

That is, of course, assuming that your Java2Script translation could be updated to output ES6 module syntax.

    James Greene

On Thu, Sep 4, 2014 at 4:55 PM, Robert Hanson <hansonr@stolaf.edu<mailto:hansonr@stolaf.edu>> wrote:
Can you send me some reference links? "transpiler"? "ES6 Module"? I realize that what I am doing is pretty wild -- direct implementation of Java in JavaScript -- but it is working so fantastically. Truly a dream come true from a code management point of view. You should check it out.

As far as I can see, what I would need if I did NOT implement async throughout Jmol is a suspendable JavaScript thread, as in Java. Is that on the horizon?
Bob Hanson

Received on Friday, 5 September 2014 12:48:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:26 UTC