News for hackers. Stuff that matters.
Re:Comparison between Rust and D by breatheoften on Saturday June 25, 2016 @04:56PM (#11977949)
Are there any languages that use a different syntax for shadowing assignment? As in:

Scope 1

  let x = 1
  let x = 2
  => error, rebinding variable in scope not allowed
Scope 2

  let x = 1
  shadow x = 2
  => works!
Scope 3

  shadow x = 2
  => error: no variable x to shadow declared in scope

I wonder how well something like that would work in practice.

There are no comments on this comment yet.