Comments (8)
SAB should definitely be marked as normative optional, as that's explicitly what got consensus.
Re 2, i'm pretty certain that was the exact goal for SES-adjacent concerns, that the constructor property must be deniable.
from ecma262.
If I understood correctly, this part should have a normative-optional attribute, right? If so, then I'm ready to prepare a pull request
<p normative-optional>Whenever a host does not provide concurrent access to SharedArrayBuffers it may omit the *"SharedArrayBuffer"* property of the global object.</p>
from ecma262.
We're actually still discussing in Matrix whether the whole SAB feature should be marked as normative optional. Technically it's the same as hiding the constructor from the global unless the host exposes it, or if the language gains the ability to discover hidden intrinsics in the future.
from ecma262.
@mhofman We specifically didn't do that in #1903 because some hosts (including notably browsers) do expose it somewhere other than the global. Normative optional features are all-or-nothing, so marking the whole feature as normative optional would mean that if the constructor was not on the global then hosts could not expose it any other way, and hence would not accomplish the goal of allowing the actual behavior browsers implement.
Where on Matrix are those conversations happening? Feel free to DM me if you don't want to put the link here.
from ecma262.
The discussion is around here: https://matrixlogs.bakkot.com/TC39_Structs_and_Shared_Structs/2024-02-15#L11
And yes, my question was that if the host does not expose the SAB constructor in any other way (wasm), is it supposed to implement the feature at all? It's not observable today, but it may become observable in the future.
Then of course if the feature is implemented and exposed through a host mechanism, there is also the question of whether the constructor should be on the global.
IMO, Normative optional means that from the author's pov, the feature may or may not be present, and that an implementation is spec compliant if it doesn't implement the feature.
from ecma262.
My expectations would be that if there is another way to get at SharedArrayBuffer, it must conform to the spec, but if there is not, then it would never be observably implementable, which means it must be normative optional - but with caveats as described.
from ecma262.
My question is, if the language itself introduces a way to discover intrinsics (or just "hidden" ones), is a conformant implementation allowed to skip all SAB intrinsics, if they're not otherwise reachable any other way.
from ecma262.
Yes, that would need to be an explicit part of the getIntrinsics proposal, I think - that no intrinsic names may be returned or accepted unless the value is reachable from user code.
from ecma262.
Related Issues (20)
- Reality and spec differ on property key resolution timing for `o[p] = f()` HOT 14
- many incorrect references to "property name" term definition
- replace -1 with a `~not-found~` sentinel in StringIndexOf and StringLastIndexOf AOs
- Scheme "http" in hyperlinks should be replaced with "https"
- Undefined `%GeneratorFunction.prototype.prototype.next%` intrinsic in CreateListIteratorRecord HOT 2
- [Editorial change (maybe typo)] Undefined VariableDeclarationEnvironment
- Typo in Note 1 of Array.prototype.lastIndexOf HOT 1
- Editorial: Consistify summaries for instrinsic functions
- use `<thead>` when appropriate
- rephrase `JSON.parse` more generally in terms of `String`-convertible value parameter HOT 3
- "agent-order" and friends should be dfn'd, not aoids
- clarify what are the "circumstances" for refining the interpretation of `LeftHandSideExpression` HOT 3
- [Feat Request / Questionable Enhancement] - Object.defineProperties returns the object having its properties defined. HOT 1
- Unclear semantics for ScriptEvaluation when scriptRecord.[[Realm]] is undefined HOT 1
- Typo in step 7 of the SuspendThisAgent abstract operation HOT 1
- Array and Object naming HOT 1
- The spec should call attention to potential instability of |WhiteSpace|
- Classes are haunted: `yield` and `await` probably shouldn't be allowed in field initializers HOT 5
- [Suggestion] Removal or replacement of functions used to introduce security vulnerabilities in modern web applications HOT 17
- enforce some minimum accuracy bound for implementation-approximated values HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecma262.