News for hackers. Stuff that matters.
Re:Stage 3 Proposal: Array.prototype.at by jakelazaroff on Wednesday June 02, 2021 @09:33AM (#27368481)
That won’t work in this case. TypeScript won’t yell at you if you pass a function that doesn't use all its arguments. If a second number argument is ever added to `at`, your code using it this way will break and TypeScript will not warn you.

This blog post explains why what you’re proposing is dangerous: https://jakearchibald.com/2021/function-callback-risks/#type...

Re:Stage 3 Proposal: Array.prototype.at by antris on Wednesday June 02, 2021 @10:14AM (#27368929)
I guess I'm then somehow doing subconscious mental gymnastics to prevent this, because me and several of my colleagues have coded like this for years and it hasn't been a problem even once.