You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main drawback I see with explicit getters/setters as suggested in #485 is that we can no longer use the attribute name to also serve as an internal slot (if needed).
In particular, with
readonly attribute boolean bodyUsed;
you could let IDL take care of ensuring there is an [[bodyUsed]] internal slot and also let IDL take care of defining that the getter returns that (you need to allow for the default to be overridden, but useful defaults are nice).
But perhaps it's not so bad to have to list both [[bodyUsed]] and getter in IDL and be a little more verbose. Not sure.
Opened this as a new issue to not distract from the main goal of making all things JavaScript-y, which I've been a long time supporter of.
The text was updated successfully, but these errors were encountered:
You're right. We could always infer it from the getter (unless an override is in place). The only minor problem is you have to define both a getter and setter, but that is just as well as they need their own algorithm too (and might want different types as pointed out elsewhere).
The main drawback I see with explicit getters/setters as suggested in #485 is that we can no longer use the attribute name to also serve as an internal slot (if needed).
In particular, with
you could let IDL take care of ensuring there is an [[bodyUsed]] internal slot and also let IDL take care of defining that the getter returns that (you need to allow for the default to be overridden, but useful defaults are nice).
But perhaps it's not so bad to have to list both [[bodyUsed]] and getter in IDL and be a little more verbose. Not sure.
Opened this as a new issue to not distract from the main goal of making all things JavaScript-y, which I've been a long time supporter of.
The text was updated successfully, but these errors were encountered: