-
Notifications
You must be signed in to change notification settings - Fork 445
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
[spec] List standards depended on #564
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should pin specific versions of these specs, no?
@jfbastien, good question. Currently, I link to the latest Unicode, here and everywhere else. That is, I intentionally avoid pinning. Ecma 262 has started doing the same recently, because that's more desirable than having to update the spec constantly. For IEEE I don't know of such a persistent reference, unfortunately. (Technically, the versions of the standards are unlikely to really matter much, since the parts that Wasm uses are unlikely to change.) |
For Unicode I think it's OK, but I think this should be a thing we bring to the WG and poll. For IEEE-754 I don't think it's OK. @sunfishcode may know better, but IIRC some of it is changing? Something about min / max / minnum / maxnum? We've specified IEEE-754 2008 in prior documents, so it seems safer to go with this for now, figure out if it's OK to just float instead, and based on these facts take a poll. So I'm OK with committing this as-is for now, contingent on a poll being taken. Could you add it to the agenda for the upcoming call once Brad checks it in? |
Actually, for Unicode can we spec it as: it's implementation-defined which Unicode spec an implementation adheres to. It shall be minimum Unicode some version. As new things get added we can bump the minimum, but basically we're telling people "use new codepoints at your own risk, older ones should work". |
The latest drafts of IEEE 754-2018 do remove |
@sunfishcode would you then recommend that we pin to 2008, or that we let it float (haha, |
I prefer pinning here. I guess the spec ought to also cite the specific sections and concepts of IEEE 754 (and Unicode) that it has copied from, and then a pinned version would keep those citations valid over time. The spelling is "IEEE 754-2008" (note the position of the dash). |
OK that sounds good to me. I do think we want to make this an explicit decision through a vote at some point. IEEE -1254 ? 😉 |
I think that's an illegal constant folding... :-) |
@jfbastien, a minimum version is exactly what Ecma moved away from regarding Unicode, to reduce unnecessary coupling and churn. Why do you suggest we should go the opposite direction? I guess pinning has less impact for IEEE, though I'd like to understand why it would be an advantage either. @sunfishcode, is IEEE not intended to remain backwards compatible, at least as far as the basic format goes? |
I'm suggesting that we understand why Ecma did so for Unicode, and figure out whether it applies to WebAssembly. The same should be done for IEEE 754. Once we have these facts I suggest we explicitly vote on a direction, so that this issue is put to rest, unless new data is presented. |
@jfbastien, I was present in that discussion, and IIRC, it was to avoid having to change the language standard every time Unicode adds another set of emojis. You could argue that a minimum version never needs updating, but in practice, you don't really want to refer to an outdated standard, so it was constantly bumped anyway. (Also, there can occasionalyl be changes that actually affect JS, but I don't think they apply to Wasm.) |
If that's the only reason then it's fine with me to float the Unicode version. I'd like a link to the discussion, and some evidence that Ecma believes Unicode intends to evolve in a backwards-compatible manner. Floating the version doesn't prevent us from mandating a minimum version, which we should also discuss and vote on.
Why? Contrast to C++ where we do, it's a small pain in the ass but every time we do an update it forces us to examine what's changed in the spec we're updating and inevitably leads to changes to C++. I agree that it sometimes causes weird inconsistencies, but eventual consistency through forced updates has worked pretty well. A concrete example: updating C++17 to point at C11 instead of C99 had a bunch of follow-ups. One of them changes how C++ deals with signal handlers. I was heavily involved in this, it's not perfect yet, but the update acted as a great forcing function to get the ball rolling. The C / C++ relationship is obviously more complex ( |
As far as I can predict, neither Unicode nor IEEE 754 is likely to change in ways that directly impact WebAssembly core for the foreseeable future, either positively or negatively. Consequently, I think either approach is workable. I gave my reason for preferring pinning already. |
I factored all links to external standards into suitable macros, which should allow updating them in one place. I also added section info, as suggested by @sunfishcode (even though that has the opposite effect).
AFAIR, some people desired to stay up to date, even when there was no strict technical need, so the minimum version was bumped repeatedly. There are understandable reasons for that, e.g, save readers from having to deal with old (and thus, multiple) spec versions and map back and forth to the current version they probably use elsewhere. Also, I think there was a desire to not make 262 look old. My take is that you only want to pin when there are concrete dependencies on features that are likely to change. If not, then it seems preferable to decouple versions as much as possible. It reduces churn for the spec and allows implementations to advance versions independently, which allows them to move faster. For example, if we pinned a certain Unicode version for Wasm, then strictly speaking, we may force an engine like V8 to ship with two instances of ICU occasionally, because for JS they likely always want the latest. Of course, no implementer in their sane mind would sign up for that, so such a spec strategy seems at odds with reality. Specifying a minimum would be middle ground, but still has the minor social disadvantages mentioned above. |
@rossberg-chromium yes, I think you've accurately summed up things. Two versions of ICU would be quite silly indeed. I think we're still missing data to make our decision though: when we poll this we need precedent (notes from TC39) and / or a policy from each standard saying what kind of breaking change they plan to make (if any, either explicit or implicit e.g. Can you get this data and move this poll forward at the next video call (or a subsequent one)? The patch LGTM with the understanding that we'll discuss and vote on this. |
@jfbastien, I created #566 to track this question separately. I'll see what info I can dig up. In the meantime, feel free to approve this PR. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks! I added it as a future topic for meetings.
generated from commit 667dbad
Adds a short section to the introduction that lists IEEE 754 and Unicode as the external standards that this spec depends on.