4 ms·
I still have problems with the false sense of security (ie, the type system lying to the developer). https://twitter.com/toolslive666/status/130953378113778074
by toolslive 6y ago
I still have problems with the false sense of security (ie, the type system lying to the developer).
https://twitter.com/toolslive666/status/1309533781137780741/photo/1 https://twitter.com/toolslive666/status/1309533781137780741/...
- tybit 6y agoThat’s fixable in this release, though behind a compiler flag https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#checked-indexed-accesses-nouncheckedindexedaccess https://devblogs.microsoft.com/typescript/announcing-typescr... Agree with the general sentiment though.
- ht85 6y agoThis might be your lucky day, check the `noUncheckedIndexedAccess` option introduced by this release!
- eyelidlessness 6y agoFortunately every new TS release (at least since I’ve been using it around 2.0) improves the safety of well typed programs, or at least allows you to opt in to that additional safety. There are risks of course in the hands of people who don’t know its limitations. But the more TS is adopted and the more strictness is embraced in the community, the lower that risk is.