Closed dumblob closed 1 year ago
This is a misunderstanding. Forget the part "remove let
keyword" which is just an unimportant side effect.
The main point is to disallow shadowing - i.e. a purely artificial constraint during the compilation step without any technical impact on anything later.
So this issue (#26) is not about what is being discussed in #11 .
It's too much of a restriction IMO, not something that is suitable for a scripting language.
That is exactly the perception which I am challenging :wink:. V is being used as a scripting language (thanks to its millisecond-level compilation times on modern HW) and proves that this restriction is very valuable and actually not restricting as a person coming from shadowing languages would initially guess.
A good metric would be to see e.g. how many times this has been mentioned in the issue tracker of V and the "Discussions" tab of V (especially What don't you like about V / what would you like to be changed?). It seems maybe twice or four times altogether in about 4 years. Compare that to thousands of other "small issues" a young language has to overcome and suddenly the bigger picture turns upside down.
WDYT?
I wonder whether you would consider disallowing variable shadowing altogether (as e.g. V proves to be really valuable and actually not annoying in practice) and thus also remove the need for the
let
keyword?