3 ms·
> let a, b, c = 0, 1, 0 That's atrocious; = should never have a lower precedence than comma.
by kazinator 9mo ago
> let a, b, c = 0, 1, 0
That's atrocious; = should never have a lower precedence than comma.
- Joker_vD 9mo agoPlease forward your complaints to Martin Richards @ https://www.cl.cam.ac.uk/~mr10/ https://www.cl.cam.ac.uk/~mr10/ for making this decision. Also, why?
- deleted 9mo ago[deleted]
- kazinator 9mo agoSorry, where did Martin Richards supposedly make this decision?
- Joker_vD 9mo agoThat's how variables are declared in BCPL, the language he designed and implemented in 1967. Keyword "LET", comma-separated list of names, "=", comma-separated list of expressions (that will be used to initialize the variables). For rare cases when one deliberately wants to leave a variable uninitialized, constant-valued expression "?" exists. Anyway, why is this syntax atrocious?