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

Native JavaScript #32

Closed
Pro2stinger opened this issue Mar 13, 2024 · 3 comments
Closed

Native JavaScript #32

Pro2stinger opened this issue Mar 13, 2024 · 3 comments
Labels
enhancement New enhancement or request wontfix This will not be worked on

Comments

@Pro2stinger
Copy link

Describe the enhancement you're suggesting.

Could you add more native javascript features such as setTimeout, setInterval, Promise, etc?

Anything else?

All variables are of static type and I cant use == instead I'm forced to do ===

@Willy-JL
Copy link
Member

The short version is no.

This is mjs, not js. Mjs doesn't support these, and adding support for them would not be possible. This is intended only to give some scripting, its not a full js implementation nor does it want to be. To support these, it would require too much overhead and dfu flash space, all of which we do not have on a 64mhz cpu, 256kb ram, and 1mb flash that is already full.

@Willy-JL Willy-JL added enhancement New enhancement or request wontfix This will not be worked on labels Mar 13, 2024
@Willy-JL Willy-JL closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@Willy-JL
Copy link
Member

To add more context, all of the features you listed would require an implementation of an event loop, timer tasks, threading (possibly) and async. This is simply beyond the scope of what is possible, and intended to be possible.

Value semi-coalescence (==) is also a sin and superfluous, and adds unnecessary complexity and space used to support something that has no place existing anyway.

@Pro2stinger
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New enhancement or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants