News for hackers. Stuff that matters.
Re:Civet: A Superset of TypeScript by mistercow on Wednesday October 23, 2024 @09:44AM (#41925008)
I slightly misspoke. The issue was that you wanted shadowing, but because of the lack of declarations, some random inner variable could suddenly reference a variable with broader scope.

For example, you might have an “x” in some inner loop within a function. Then later on, you’d add an “x” earlier in the function, not realizing that that name was used down below. Suddenly the inner loop is referencing that new variable, and there was no way to tell other than the surprising ways your code would suddenly malfunction.

Re:Civet: A Superset of TypeScript by scotty79 on Wednesday October 23, 2024 @04:39PM (#41929076)
Ah, I see, you are right. It's terrible behavior.