-
Notifications
You must be signed in to change notification settings - Fork 37
One final syntactic bikeshed... #106
Comments
Huh, we discussed various alternate forms (see #11 and #24) but never one that removed the I'm not a big fan of removing the However, I don't understand your idea that this emphasizes where the awaiting takes place. To me it looks like you are |
This looks better than "for await () { }" IMHO, this looks more "Java"Ish also. What is the relation of this proposal and "for ( on )" on here? That also went for removing "of" so this might be also reasonable? |
|
The binding (or assignment) of the loop variable takes reoccurs on each iteration. To me, the placement of Alternatively, you might say |
Let's say you want an await expression as the async-iterable: // for-await-of 1
for await (let n of await exp) {} // for-await
for (let n await await exp) {} // for-await-of 2
for (let n await of await exp) {} |
I'm pretty happy with the current syntax myself, it's intuitive enough with the existing |
One possibility to avoid the confusion about |
See previous threads linked above. |
I think it's best we close this. No arguments for new syntax (or previously-suggested syntax) have been convincing; in particular #106 (comment) seems fatal. Indeed, I can't see a way to really use In any case, thanks for the suggestion! |
I know it is quite late for this, but I find no record of this every having been suggested or discussed.
Why not use the syntax:
This seems much more aligned with the other forms of the
for
statement and it emphasizes exactly where the awaitng takes places.The text was updated successfully, but these errors were encountered: