Hacker News new | ask | show | jobs
by kazinator 131 days ago
> let a, b, c = 0, 1, 0

That's atrocious; = should never have a lower precedence than comma.

1 comments

Please forward your complaints to Martin Richards @ https://www.cl.cam.ac.uk/~mr10/ for making this decision.

Also, why?

Sorry, where did Martin Richards supposedly make this decision?
That'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?