Block or function scope?
jakearchibald opened this issue · comments
await worker({|
var foo = 'bar';
|});
Does the above create a variable scoped to the block, or a syntax error?
As a would-be user of this syntax, I'd expect a syntax error here.
Per the last paragraph of https://github.com/domenic/proposal-blocks#the-basic-idea, it creates a variable scoped to the block/function body.
Ah, sorry, missed that bit.
I think this is another reason a function-like syntax would be clearer #5.