let a = 1
let a = 2
let b = a
This code quietly compiles, runs and binds b = 2.
But is this desired behavior? It does allow the coder to reuse an appropriate value name, no objects have been mutated, however in the midst of n lines of code it is all too easy to accidentally use a value name again in the same namespace and in practical terms introduce a bug by mutation. I wonder how this fits with the functional paradigm and if there ought to be a warning of sorts.