-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Suggestion: remove everything mentioned in annex B of the ECMAScript standard #7982
Comments
If v8 implements it, and there isn't a good reason to remove it, we won't remove it. Some of them might be really difficult to remove. Most things in Annex B are being moved out anyways, as TC39 wants to kill off Annex B.
Deno aims for browser compatibility where logical. So yes, it does fall under this exception. If it is implemented in v8 for "free", it is harder and riskier to un-implement it than to just allow it. You mess with some internals like that, you can easily for v8 into de-optimising code, which would be bad for everyone. We had to make with the removal of
Because it is a security issue, and in the move of If you have a security reason to remove the other parts of Annex B, we would potentially consider those. |
I was legitimately expecting that this would merely be a few more But, it still appears that they did not want to make anything in that annex required to be implemented, in order to be considered a spec-compliant ES engine. They would remain optional normative, meaning that Deno is not required to implement them, and is still discouraged from doing so.
(emphasis mine) Deno frankly cannot run all legacy code if it tried, as, by default, user code is run as a module. This implies strict mode, which is known to break old code.
If you rewrite V8 without it, I could understand the potential to cause an error, but, from my naive understanding of V8, if you were to just
In my opinion, the example @ry had given was an exceptionally poor choice. |
Update:
It seems like, as of 2019-2020 the V8 developers have yet to fix the bugs regarding their implementation of |
As I have stated above, our stance is not to proactively remove Annex B features that automatically exist in v8 without a good reason. Closing the issue. |
Annex B will be annotated as |
I still don't think we would prevent them from being used. People will get feedback in the editor though that they are deprecated and |
Currently, Deno already doesn't allow access to
Object.prototype.__proto__
, which was later defined in annex B of the ES spec.The section starts with the following note:
Focusing on the last sentence, Deno does not fall under any of the exceptions they mention, so should Deno have these?
Does Deno even classify as an ES implementation, or would that be V8 (with Deno's Rust bindings)?
As mentioned before,
__proto__
is deleted before user code is run, so why not remove the rest?From my personal experience, everything mentioned in annex B is rarely used in modern code, the only potential exception possibly being
String.prototype.substr
, although, don't take my word for it.Update
A possible alternative to outright removing them, and potentially forcing users to suffer the unexpected consequences could be that there would be a new flag added that would allow opt-in (or opt-out, as this is quite late, and users may already depend upon it), that would allow or disable annex B in Deno, which would also allow the ability to regain
Object.prototype.__proto__
, as it is currently considered a security vulnerability, for reasons that I personally cannot agree with.The text was updated successfully, but these errors were encountered: