Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
jpoesen | 🇪🇺 | 🏳️‍🌈
@jpoesen@social.jpoesen.com  ·  activity timestamp 2 days ago

So basically the whole #cloudflare outage was due to code that wasn't robust enough.

They used a function that can return a certain type of object OR AN ERROR.

They assumed the returned value would always be an object of the expected type and tried to use it as such.

In PHP terms, similar to:

$items = get_items();
foreach ($items as $item) {
$item->process();
}

In #PHP we'd catch this early through static analysis & add explicit type checks everywhere.

Doesn't #Rust have this?

  • Copy link
  • Flag this post
  • Block
Log in

Kakapo Social

Kakapo Social: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login