4 ms·
You're missing the point. The fact that the language still allows you to write `p.isImmortal = true;` is the issue.
by objectiveariel 9y ago
You're missing the point. The fact that the language still allows you to write `p.isImmortal = true;` is the issue.
- coldtea 9y agoWhich won't do anything. p.isImmortal will still be the setter. So it's a non issue -- and the linter can catch the mistake anyway.
- oceanswave 9y agoAnd my linter, or flow, typescript will pick that up in the same way the compiler will. Just because tooling these days catches these things in 'type safe' languages doesn't mean it's not a pointer to a chunk of memory that's defined at runtime beneath it all.