ebg
12
Strong -1.
IMO from having to maintain a large codebase with a mix of developer levels, this is going to turn out very very poorly.
Developers will see @const in the codebase and due to its use in other languages we will very shortly start seeing @const appended to all and every let variable possible.
This keyword is an open invitation to cargo cult programming. Without any particular reason, code reviewers will start saying "add a @const here", because surely it can only be a positive to mark something const. Eventually, all lets will be marked @const, and the sane engineer in the room will start to wonder what's the point of @const let x = 11 when the compiler should have already inferred that.
I strongly believe @const should only be permitted as part of an API requirement to prevent this from happening. And it will happen.
8 Likes