Git Product home page Git Product logo

Comments (3)

RexJaeschke avatar RexJaeschke commented on August 15, 2024

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.

JoelMarcey avatar JoelMarcey commented on August 15, 2024

@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.

JoelMarcey avatar JoelMarcey commented on August 15, 2024

I think fixed by: fa00414

from hack-langspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.