Comments (3)
Re "... should probably mention await. Might be missing in other syntax specifiers too.", the link takes me to the top of the chapter on expressions. The syntax for await begins in Expressions:Unary Operators:Await Operator.
The quoted text should be, "When an async function is compiled, a special transformation is performed, so that an object that implements Awaitable (§17.6.2) is returned to the caller (where T is the function's return-type)." Somehow the after Awaitable got stripped off.
Regarding return-type, if for async functions one must always write the return type as Awaitable, then the following need to be changed:
Expressions:Primary Expressions:Anonymous Function-Creation
If async is present, return-type must be a type that implements Awaitable (§17.6.2).
Expressions:Lambda Expressions
If async is present, return-type must be a type that implements Awaitable (§17.6.2).
Functions:Function Definitions
If async is present, return-type must be a type that implements Awaitable (§17.6.2).
Re "When yielding control, the implementation of await may choose to yield control back to the current async function's caller.", this was taken verbatim from the 'Async and await' design document.
from hack-langspec.
@RexJaeschke @jwatzman I am actually confused. What wording has been "stripped off"? I see all the words mentioned in the current version of the markdown.
from hack-langspec.
I think fixed by: fa00414
from hack-langspec.
Related Issues (20)
- Add grammar and description for "where" clauses
- Mistakes and omissions regarding awaitables
- Additional use clause kinds in ch 20
- use clause grammar is incorrect for "simple" clauses
- use clause grammar is incorrect for group clauses
- "require" clauses need to be able to take generic types
- Attribute grammar should allow trailing commas
- Problems with variadic parameters
- issues with field initializers HOT 1
- collection expression lists may be comma terminated
- Default variance for type parameters
- Abstract constructors not represented in grammar
- Spec compliance of HHVM?
- Arr-D observable in any way?
- Restrictions on interface methods should be clarified
- Typo in chapter 14
- Error in ch 20 regarding nested namespaces HOT 1
- Typos in ch 20
- Restriction on contents of abstract final classes needs description
- "final abstract" should be legal for class declaration
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 hack-langspec.