yeah, exactly. it's for explicit ownership transfer. you always own what you receive, sum it, release both inputs, done. no mutation tracking, no aliasing concerns.
It sparked joy and some great discussions. I turned the idea into a tiny, compiler-agnostic header-only shim that provides defer-like semantics in C as a short-term workaround until the language (hopefully?) adds a defer statement - Yay! :)
https://github.com/sueszli/autograd.c/blob/main/src/autograd...
i wonder whether there is a more clever way to do this without sacrificing simplicity.
reply