Object and partial ES5 support #359
Replies: 3 comments
-
Posted at 2015-04-17 by @gfwilliams Ahh - I think I'd added While you might use these functions for extending the language, I'd be surprised if that kind of stuff got used when actually 'doing stuff' with the microcontroller - hence it hasn't really taken priority. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-17 by WebReflection I personally would be already happy with a fully compliant ES3 code-base but the fact That being said, I agree you usually go easy with micro controllers and JS, without bringing absurd alchemies in, but since Espruino supports and promotes the usage of modules, you surely know that module and imported API + getters/setters play usually very well, and give developers the ability to create code that is more pleasant to use. I just wanted to understand the rational behind those methods and I got it, I also hope those methods could make it without bloating too much the core. Regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-17 by @gfwilliams Thanks - yes, hopefully they will, but it's not a priority right now. I'd love to have getters and setters though - I don't believe it would be a massive amount of work. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-17 by WebReflection
In Espruino Pico 1v76 I've noticed that
Object.getOwnPropertyDescriptor
is present, and returns a descriptor object, but everything else available in ES5 to actually define properties through descriptors is missing:All these are
undefined
and I wonder why, at this point,Object.getOwnPropertyDescriptor
is available. It kinda misleads features detection.As summary: is there any plan to bring the ability to define properties through descriptors, or, if not, could we just drop
getOwnPropertyDescriptor
so no code would be confused about its presence?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions