ES6 Support #24

Closed
opened 2024-09-04 13:22:27 +00:00 by TopchetoEU · 1 comment
TopchetoEU commented 2024-09-04 13:22:27 +00:00 (Migrated from github.com)

Currently, the engine has good ES5 support. However, for any real-world application having ES6 support is imperative.

The following features ought to be implemented:

  • Arrow functions (#26)
  • Default arguments (#26)
  • Spread arguments (#26)
  • ES6-style variable declarations (let and const) (#26)
  • Variable, parameter and assignment deconstructions (#28)
  • Object literal shorthands, methods and computed keys (#28)
  • Class definitions (#29 WIP)
  • Array deconstructors
  • Spread syntax in objects
  • Spread syntax in arrays
  • Spread syntax in calls (and dynamic argument count in calls)
  • Nullish coalescing operator and assignment (??)
  • Optional indexing (.?)
  • &&= and ||= operators (ES5 features that are missing)
  • Generator functions
  • new.target
  • Exponent operator
  • For-of loop
  • Optional parsing mode for ES module files

The following will NOT be implemented:

  • eval() - brings multiple complexities into the project, mostly with the resolution of variables in the runtime, for the benefit of a feature which is unsafe and has the better alternative of the Function constructor
  • Non-strict context (aka JS code will be compiled and run "use strict" implied)
Currently, the engine has good ES5 support. However, for any real-world application having ES6 support is imperative. The following features ought to be implemented: - [x] Arrow functions (#26) - [x] Default arguments (#26) - [x] Spread arguments (#26) - [x] ES6-style variable declarations (let and const) (#26) - [x] Variable, parameter and assignment deconstructions (#28) - [x] Object literal shorthands, methods and computed keys (#28) - [ ] Class definitions (#29 WIP) - [ ] Array deconstructors - [ ] Spread syntax in objects - [ ] Spread syntax in arrays - [ ] Spread syntax in calls (and dynamic argument count in calls) - [ ] Nullish coalescing operator and assignment (??) - [ ] Optional indexing (.?) - [ ] &&= and ||= operators (ES5 features that are missing) - [ ] Generator functions - [ ] new.target - [ ] Exponent operator - [ ] For-of loop - [ ] Optional parsing mode for ES module files The following will NOT be implemented: - eval() - brings multiple complexities into the project, mostly with the resolution of variables in the runtime, for the benefit of a feature which is unsafe and has the better alternative of the Function constructor - Non-strict context (aka JS code will be compiled and run "use strict" implied)

This is cancelled, use babel instead

This is cancelled, use babel instead
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: topchetoeu/j2s#24
No description provided.