It’s refreshing to have a nice reply online! Thank you, too. :)
hperrin
Simple solution: write your own damn code.
To add to my own comment, I want to remind you that JavaScript was designed to power websites, and having an entire website break because an array didn’t have anything in it yet is probably worse than the alternative.
A lot of JS’ decisions actually make sense when you understand its history. That doesn’t mean it’s a great language, but it’s undeniably good at fulfilling its original purpose, making websites interactive in myriad different browser implementations.
I’m sorry but your problem here is solely with JavaScript, not TypeScript. TS is right to assign that type to the value, because that is perfectly valid JS, and that is the type you should expect.
It’s not hard to check for undefined
and there are absolutely times you wouldn’t want an error to be thrown, so this is just you having a preference, and judging an entire language based on your preference.
There are actual reasons to dislike how JS works, out of bounds array access returning undefined is not one of them.
It’s a little snarky, and as such, gives off an unprofessional vibe, but I agree with the core message fully.
If you physically spin it, yes, it wouldn’t change its direction, but I was talking about flipping the image horizontally.
Flip it horizontally?
You don’t think the cheating pedophile, who cheats and lies about everything, constantly, knows that he cheats and lies?
Yes, he knows he cheats. Also, he’s on the Epstein list. He knows that too.
It was the only thing I’m really good at, and I enjoy doing it.
Turns out, I like doing it for me, not as much doing it for some big corpo. But hey, I’m still good at it.
Now I get to do it for me again, cause I started my own business, and I’m a lot happier than I was in my twenties and early thirties.
He wants to feel like a winner, and it doesn’t matter to him if he’s actually a winner. He’s the biggest, sorest loser in the world, and his ego is just too fragile to admit it to himself.
You mean the pedophile is also a golf cheat? Who knew.
Released the Epstein files.
I’m pretty sure my cat understands that people are not cats. She hisses at any other cat she sees, but has no problem with people.