News for hackers. Stuff that matters.
Re:Cloudflare outage on November 18, 2025 post mortem by bigstrat2003 on Tuesday November 18, 2025 @10:56PM (#45975691)
> No more than returning an int by definition means the method can return -2.

What? Returning an int does in fact mean that the method can return -2. I have no idea what your argument is with this, because you seem to be disagreeing with the person while actually agreeing with them.

Re:Cloudflare outage on November 18, 2025 post mortem by Dylan16807 on Thursday November 20, 2025 @02:34AM (#45989953)
> What? Returning an int does in fact mean that the method can return -2.

What? No it doesn't.

  fn square(n: i32) -> i32 {
      n * n
  }
This method cannot return -2.

Though in this case it's more like knowing that the specific way you call the function in foo.rs will never get back a -2.

  fn bar(n: i32, allow_negative: bool) -> i32 {
      let new = n * 2;
      if allow_negative || new >= 0 { new } else { 0 }
  }
  bar(x, false)