-
Notifications
You must be signed in to change notification settings - Fork 62
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
Naming conflict with WebIDL's record<K, V> #116
Comments
I don't think we should constrain the naming of runtime types based on purely editorial names in a specification; if it's confusing, and Record is the best name for this proposal, then it might be advisable at that time for WebIDL to rename its record type. |
Thanks for raising this, @hober . It's important that we think these interactions through. In #96, there seems to be agreement among the TC39 delegates who commented that, while it would be a lot of work, it may be the best tradeoff to rename the ECMA262-internal "record" concept to something else, especially since it's not available to JS code. Do you think such a similar tradeoff would be viable in WebIDL terminology as well, to be open to changing the name of WebIDL records, given that, from a JS developer's perspective, WebIDL records might be considered "just objects"? I'm encouraged by other transitions in WebIDL notation that have successfully landed over the past few years. |
Maybe. That's why I filed whatwg/webidl#881 too. |
We are going to try to solve this issue before stage 3, that means either finding out if we can change WebIDL terminology or finding another name for this proposal (see #116). |
Per #82 we are going to keep Record & Tuple. We intend to disambiguate in the ECMA262 spec by explicitly referring to "Record Primitive" as we discussed in #96 (comment). Do you think something similar could be done in WebIDL? |
I think a better bet for both specs is to change their Record concept to something else, since Record alone will now mean the primitive in every other JS context. |
While I think it would be great for Web IDL to change the type name, it may be worth noting that Web IDL already has the potential to confuse people about things like this many times over if, for example, a reader expects |
I agree, when opening whatwg/webidl#1184 (that I need to finish working on the feedback...), we figured that there is not a major ambiguity between WebIDL Records and ECMAScript Records, at least as long as we contain ECMAScript Records in the ECMAScript interaction section... It has been moved to a Stage 4 concern for the time being as it should still be solved down the line... |
Since spec authors are always the bottom run of the priority of constituencies, spec names conflicting with runtime names must never be a blocking conflict, in HTML (i presume, lest they violate their own priorities) or JS. |
WebIDL has had record types for a number of years now—see 2.13.28. Record types — record<K, V> for the definition—and it's pretty confusing that the
Record
type in your proposal is so different from it. The web platform should be consistent in its use of the term.This is related to, but distinct from, issues #82 and #96.
See also whatwg/webidl#881.
The text was updated successfully, but these errors were encountered: