Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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!



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: