Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ES6 features #6330

Open
5 tasks
rachel-fenichel opened this issue Aug 8, 2022 · 0 comments
Open
5 tasks

Use ES6 features #6330

rachel-fenichel opened this issue Aug 8, 2022 · 0 comments
Labels
issue: feature request Describes a new feature and why it should be added type: cleanup
Milestone

Comments

@rachel-fenichel
Copy link
Collaborator

rachel-fenichel commented Aug 8, 2022

Is your feature request related to a problem? Please describe.

After removing support for Internet Explorer (#6325) and updating the generated target to ES2015 (#6328) we can also remove ES5-specific code in favor of ES6 constructs without inducing bloat from overly aggressive polyfills.

This is a place to track which features we want to use, rationale for changes, and rationale for any old language features we continue to exclusively use.

Describe the solution you'd like

Update old code to use new features across the codebase, where those features are known to improve performance, size, or readability.

Describe alternatives you've considered

Stick with existing code, and use new features as we write new code.

Feature list

  • Use Maps instead of Object.create(null)
  • array.includes is in ES2016 Convert array.indexOf(a) !== -1 to array.includes(a)
  • Delete object.inherits and object.mixin
  • Needs investigation Use default parameters
  • Use Sets
@rachel-fenichel rachel-fenichel added issue: triage Issues awaiting triage by a Blockly team member type: cleanup issue: feature request Describes a new feature and why it should be added and removed issue: triage Issues awaiting triage by a Blockly team member labels Aug 8, 2022
@rachel-fenichel rachel-fenichel added this to the Feature Fest milestone Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature request Describes a new feature and why it should be added type: cleanup
Projects
None yet
Development

No branches or pull requests

1 participant