News for hackers. Stuff that matters.
Re:On the impossibility of composing finalizers and FFI by epcoa on Tuesday February 27, 2024 @12:31PM (#39526813)
Indeed, it isn’t caused by it at all.

  struct S { int s; };

  int *i;

  {
     struct S s;
     i = &s.s;
  }

  *i = 7; // and in C++ you can even write int& j = *i;
No GC or finalizers involved here. Hope you have ubsan. The point being that GC is sort of a red herring in the entire discussion. Easily subverted lifetime and ownership semantics are going to be error prone irrespective.

There are no comments on this comment yet.