-
Notifications
You must be signed in to change notification settings - Fork 0
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
What syntax should we use here? #3
Comments
I personally think One way to think about it might be to consider what the language would've looked like if all reserved used such syntax: @[class] Point {
constructor(x, y) {
@[this].x = x
@[this].y = y
}
}
@[function] add(a, b) {
@[return] a + b
}
@[async] @[generator] @[function] foo(sequence) {
@[for await] (@[const] x @[of] sequence) {
@[yield] 12
}
} class! Point {
constructor(x, y) {
this!.x = x
this!.y = y
}
}
function! add(a, b) {
return! a + b
}
async! generator! function! foo(sequence) {
for! await! (const! x of! sequence) {
yield! 12
}
} Although special syntax does make me wonder of the feasibility of macros with some builtin ones that might not be implementable in userland (e.g. tailcall). |
I like
I don't like any of those better than the proposed. |
In my very humble opinion |
If we go with the static/built-in decorators proposal, we may just be able to use |
Good news. Don't worry, you have a lot of work with a lot of proposals. |
The current explainer uses
@[expressionLike]
. What do you think the syntax should be?The text was updated successfully, but these errors were encountered: