Skip to content
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 is Inconsistent with Values in Completion Records #6

Open
IgnoredAmbience opened this issue Nov 18, 2016 · 6 comments
Open

Spec is Inconsistent with Values in Completion Records #6

IgnoredAmbience opened this issue Nov 18, 2016 · 6 comments
Labels
discussion jsref Tasks impacting jsref design and codebase.

Comments

@IgnoredAmbience
Copy link
Member

Completion record defined as only containing language values, however in a number of places specification values are returned (References, primary example).

ecma262 has a couple of interesting issues open on this topic, where we could potentially help:
tc39/ecma262#496
tc39/ecma262#497

There's also work to add type signatures to the spec here:
tc39/ecma262#545

@IgnoredAmbience
Copy link
Member Author

As noted in that thread the phrasing "Unless it is otherwise obvious from the context" phrase in section 6.2.2.2 is the trapdoor which allows for union return value types of Completion Records or Specification Values. Although it's hardly "obvious"!

@IgnoredAmbience
Copy link
Member Author

See also speced/bikeshed#673

@IgnoredAmbience
Copy link
Member Author

GADTs a suitable means of typing throwing/non-throwing Completion Records for type inference of specification methods?

@charguer
Copy link
Contributor

charguer commented May 11, 2017 via email

@IgnoredAmbience
Copy link
Member Author

Currently meeting with @johanneskloos, briefly discussing the project.

One aim I mentioned that the committee would like would be type inference for whether particular operations can potentially return abrupt completion records. As far as I can tell, the existing types we use cannot infer this at present. Requires further thought.

@IgnoredAmbience IgnoredAmbience added discussion jsref Tasks impacting jsref design and codebase. labels Jul 3, 2018
@ByteEater-pl
Copy link

Completion record defined as only containing language values, however in a number of places specification values are returned (References, primary example).

References used to be language values (albeit ECMA-262 didn't use this capability and user code couldn't return any either, so it was provided only for callable hosts objects (e.g. methods on hosts objects), and the only use I know of is E4X (ECMA-357)), ES5 changed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion jsref Tasks impacting jsref design and codebase.
Projects
None yet
Development

No branches or pull requests

3 participants