Re:Why Does “=” Mean Assignment?
by raverbashing on Tuesday April 10, 2018 @05:09PM
(#16805452)
Let became optional quickly it seems
But most BASIC versions would accept 'let a = 1'
Personally, I don't see why the big fuss. If your assignment and comparison operators are the same the only thing you lose is doing x = (y == 2); kind of expressions (since you would disambiguate from conditional expressions).
Now, assignments are done more frequently than comparisons, hence why it makes sense for it to be the simpler/shorter one.
You wouldn't even lose that if you can accept that assignments can't be expressions, which seems like a bit less of a loss.
> And most BASICs, though some (most?) required the keyword LET to introduce an assignment, as well.
LET was virtually always optional; an expression by itself on a line (like 'X <> 10') is a syntax error anyway, so removing LET doesn't introduce any ambiguity.
And most BASICs, though some (most?) required the keyword LET to introduce an assignment, as well.