Any Go / javascript engine with EcmaScript 6 support ?

1,775 views
Skip to first unread message

parais...@gmail.com

unread,
Apr 6, 2016, 6:18:53 AM4/6/16
to golang-nuts
Hi , I'm moving from NodeJs to Go , however I'd like to support a codebase written in javascript directly in my Go app.

I searched for Go/js engines , I found go-duktape (it works well and is fast enough )  , unfortunately it doesn't support a lot of ES6 features. 

Are there any projects or js engines that have Go bindings and support EcmaScript 6 ? It would help me get completely rid of NodeJs 

thanks 


Manlio Perillo

unread,
Apr 6, 2016, 6:41:37 AM4/6/16
to golang-nuts, parais...@gmail.com
Another Javascript implementation is Otto

However, according to https://github.com/robertkrimen/otto/issues/161, it only supports ECMA5.
You can try to ask the author is there are plans for ECMA6 support.

Manlio 

Steven Hartland

unread,
Apr 6, 2016, 6:56:48 AM4/6/16
to golan...@googlegroups.com
We're actively accepting PR's for otto, so if someone wants to add ECMA6 support feel free :)

John Jeffery

unread,
Apr 6, 2016, 5:25:46 PM4/6/16
to golang-nuts, parais...@gmail.com
Is it practical for you to use one of the transpilers that convert ES6 to ES5? I'm thinking of Traceur or Babel. I think that as of version 1.8 Typescript can now transpile ES6 to ES5 as well.

nkis...@megam.io

unread,
Apr 8, 2016, 1:15:25 AM4/8/16
to golang-nuts, parais...@gmail.com
But why do want a Go/js engine ? Why can't you transpile and let the browser do its job. 

We are integrating "ember js" code by transpiling into 2 (js vendor.js, <app>.js).

marc

unread,
Apr 8, 2016, 3:02:17 AM4/8/16
to nkis...@megam.io, golang-nuts
Hi, I'm using Javascript on the server, not in the client or I wouldn't need a Go/Javascript engine.

I
Reply all
Reply to author
Forward
0 new messages