Open vadzim opened 6 years ago
Hmmm.. may be the for
keyword could be better for that:
a(let foo for 1) {
// ...
}
// means
a(1, (foo) => {
...
})
a(let [foo, bar] for 1, 2) {
// ...
}
// means
a(1, 2, ([foo, bar]) => {
...
})
a(let foo, bar for 1, 2) {
// ...
}
// means
a(1, 2, (foo, bar) => {
...
})
a(const foo, bar for 1, 2) {
// ...
}
// means
a(1, 2, (__foo__, __bar__) => {
const foo = __foo__, bar = __bar__
...
})
Could it make sense to make arguments syntax for-like? Instead of writing
we could write
Or we can use other separator between arguments lists. E.g.
;
: