For a long time GopherJS had a policy of maintaining generated code compatibility with the ECMAScript 5 standard. ES 5 was a good choice due to its broad browser support and ability to use GopherJS-generated scripts almost anywhere without additional post-processing.
However, in the time passed the web landscape has changed enough for us to reconsider this policy. In particular, 94.35% of clients fully support ES 2015 with 2.28% offering partial support according to caniuse. GopherJS already uses ES 2015 typed arrays (supported by 97.98% of clients), so ES 2015 adoption would impact 3.64% of web users (pessimistically assuming that partial support is insufficient). In practice we expect the impact to be further mitigated by the following factors:
As the JavaScript ecosystem evolves, benefits of adopting newer ECMAScript standards become more and more significant for GopherJS. Here is an incomplete list of improvements that become possible with ECMAScript 2015:
We declare ECMAScript 2015 a baseline targeted version. Any syntax or an API that is a part of the baseline targeted version can be used in the GopherJS generated code, unless explicitly stated in this policy. It is up to the users to transpile or polyfill it for older runtimes.
The baseline targeted version can be updated to newer ECMAScript standards if the following guidelines are met:
We recognize that in many ways the value judgement in this question is subjective, but the final decision is made by consensus among the currently active GopherJS maintainers. If the decision to upgrade the baseline targeted verision is made, it should only take effect when the next minor version is released (i.e. 1.x).
For the ECMAScript features from standard versions newer than the baseline, the following rules apply:
Common sense applies: The rules above are meant to provide general guidelines, but we acknowledge that making exceptions may be necessary from time to time. Our ultimate goal is to make GopherJS as useful to our users as possible and avoid inflicting unnecessary toil on them or the maintainers.
Prior discussions:RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4