News for hackers. Stuff that matters.
Re:We don't need runtime type checks by jmyeet on Thursday March 03, 2022 @02:41PM (#30545721)
Some thoughts:

> Because, here's the thing about runtime type checks: they are a debugging device, not so much a safety net.

Yes, knowing why something crashed is a debugging tool and a pretty useful one at that.

But what are you gaining by turning off the runtime type checker? It's not clear. PHP in particular tends to be IO not CPU bound and the people who have CPU performance issues with PHP are so few. What problem is being solved here?

But the author seems to be arguging for static type checking in PHP. You won't get an argument against this from me. I consider dynamic typing a false economy and anathema to a large multi-developer code base.

Oh and Hack is a superior PHP too.

Re:We don't need runtime type checks by qiskit on Thursday March 03, 2022 @03:43PM (#30546697)
> But what are you gaining by turning off the runtime type checker? It's not clear.

Only possibilities are a tiny boost in speed or a tiny improvement in memory footprint? Can't think of anything else.

> PHP in particular tends to be IO not CPU bound and the people who have CPU performance issues with PHP are so few. What problem is being solved here?

Excellent point.

> I consider dynamic typing a false economy and anathema to a large multi-developer code base.

Catch and fix as much as you can statically. Common sense to me. But there are those who passionately argue otherwise.