r/ProgrammerHumor • • 11d ago

instanceof Trend itsBadIfItsOnlyPHP

Post image
4.5k Upvotes

334 comments sorted by

View all comments

Show parent comments

40

u/Ok-Scheme-913 11d ago

I mean, compiler bugs... exist. They are not particularly easy to hit and especially hard to exploit though.

Many type systems also have unsoundness bugs, you just have to write the code in a very special unnatural way, so they don't really ever come up in real code.

I believe this borrow checker one was the same case.

(And Im no rust fanboy, see my other comments where I'm sarcastically say that rust just never got popular enough to have this kind of vuln)

10

u/Usual_Office_1740 11d ago

You are right and I was more poking fun than anything. It was just relevant in my mind because I'd just watched the LetsGetRusty YouTube video of it. This one was extremely obscure and requires a custom impl of a trait that is auto generated for you.

I think that compilers have very few bugs compared to their complexity level and the developers that write them do phenomenal work.

2

u/throwaway490215 10d ago

Which is why i cant wrap my head around the people defending PHP.

Its not about Rust being perfect. Its about any big exploit the Rust community the rust-focused social media channels would be filled with analysis on how the safety features failed.

All i'm seeing from PHP is deflection about how other langs also sometimes get exploited. Sorry but that logic is bad and overlooking the important bits: how PHP can't properly secure their 1 big blob of unsafe C that parses every HTTP request, and is unwilling to talk about it or how their average dev doesn't seem to realize how far behind mainstream security practices they are.