matthewmueller / joy

A delightful Go to Javascript compiler (ON HOLD)
https://mat.tm/joy
GNU General Public License v3.0
1.32k stars 35 forks source link

What is the minimum environment requirement? #62

Closed caspervonb closed 6 years ago

caspervonb commented 6 years ago

Outputs ES3 Javascript that works in every browser That's all fine and well, but it's inconsistent, async is used for one.

But also comments like the following from stdlib/json

// TODO: create & use object.assign runtime

So, do we prefer idiomatic JavaScript, or what's most widely available?

In other words, choose String.prototype.indexOf over String.prototype.includes for implementing strings.Contains?

matthewmueller commented 6 years ago

That comment is confusing – I meant an object assign equivalent (pretty much just a for in loop). This would just be for code reuse.

Right now Joy compiles to ES7, but I have a path to ES3 that I think will work.

There's actually only 2 things that aren't ES3 compatible right now:

Will close this issue and make a note to open a more comprehensive issue of what needs to be done for proper ES3 support