
29 Nov
2020
29 Nov
'20
3:39 p.m.
On Sun, 29 Nov 2020 at 23:34, Guido van Rossum guido@python.org wrote:
OTOH if we were to introduce 'let' or 'const' in the language, it would surely be usable to solve a whole bunch of other problems, in addition to giving us a cleaner way to solve the value capture problem.
Well, IMHO let could help the famous misspelled var problem:
myvar = 5 [...] myvvar = 7 # Whops!
but to work, if let is used somewhere in the scope, all the variables declared in the scope must be declared with let:
let myvar = 5 myvvar = 7 # SyntaxError
But I'm really unsure that this is what you want.