Remix.run Logo
const_cast 6 hours ago

I work in PHP, I would say about 90% of all bugs are type errors.

Even if they're not type errors, if I sit back and think about what the root cause is, it's the type system and dynamic typing.

Addressing an array at null? Type error! Referring to a key that doesn't exist? Believe it or not - not a logic error, that's a type error! If we uses objects or structs that's not possible, but arrays are basically structs with dynamic member ;(

Anything around empty()? Type error. Arithmetic errors? Almost always type errors! Using postfix logic operators? Believe it or not, type error! Anything around DateTime? Usually a type error!