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

Fixing description of [[FunctionKind]] internal slot of Function Object. #1308

Open
ENvironmentSet opened this Issue Sep 13, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@ENvironmentSet

ENvironmentSet commented Sep 13, 2018

In FunctionAllocate there is few logic.

  1. Assert: functionKind is either "normal", "non-constructor", "generator", "async", or "async generator"
  2. Set F.[[FunctionKind]] to functionKind.

So, we can say, F.[[FunctionKind]] can be "async generator".
but, description about [[FunctionKind]] in specification, It isn't

Either "normal", "classConstructor", "generator" or "async"

I think, to change this to blow will be better.

Either "normal", "classConstructor", "generator", "async" or "async generator"

PS. why FunctionKind of async generator is "async generator" ? even class constructor is "classConstructor". I think it have to be "asyncGenerator", because specification usually use camel case.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Sep 13, 2018

Member

Fixing the description is good; i don’t have a strong opinion on “asyncGenerator” vs “async generator”, but since it’s not an identifier, there’s no reason it needs to be in camelCase.

Member

ljharb commented Sep 13, 2018

Fixing the description is good; i don’t have a strong opinion on “asyncGenerator” vs “async generator”, but since it’s not an identifier, there’s no reason it needs to be in camelCase.

@ENvironmentSet

This comment has been minimized.

Show comment
Hide comment
@ENvironmentSet

ENvironmentSet Sep 13, 2018

then, just hold current("async generator") would be better. thx for provide opinion.

ENvironmentSet commented Sep 13, 2018

then, just hold current("async generator") would be better. thx for provide opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment