News for hackers. Stuff that matters.
Re:Software Engineering principles to make teams better by amw-zero on Sunday July 04, 2021 @08:16AM (#27729087)
You still have local reasoning with struct semantics. You are not giving that up in exchange for performance, you get both.

  func newStructValue(s: Struct) -> Struct {
    s.value = 5

    return s
  }
The reasoning for this block of code is totally local to the function body. Because the only reference to `s` is in the body of the function - it cannot be more local than that.

There are no comments on this comment yet.