r/programming • u/Practical-Medium-858 • Sep 19 '26
What if only one allocation needs to be borrow checked in a managed program?
https://nitinm.dev/blog/gradual_ownership_in_a_high_level_language
11
Upvotes
20
u/valarauca14 Sep 19 '26 edited Sep 19 '26 •
Creating a, "Self-defeating straw man", to demonstrate why a programming language should exist is always strange to me.
Rhetorically I understand what you're trying to say. Being able to read Rust, your point is lost in such a trivial example the thesis of the point becomes muddled.
Then the comparison from A:B uses an entirely different API? Just WTF?
1
u/ROBOTRON31415 Sep 24 '26
One minor nitpick: “Now image stays in the owned world and its lifetime is coupled with Layer.“
Just to avoid any confusion in terminology, I would say its “liveness” is coupled with Layer. At least in Rust, lifetimes are a type-level construct, not a value-level thing (the value-level property is the duration of being valid/initialized/“live”).
(The word “lifetime” is horribly overloaded in CS. IIRC, C/C++ do use “lifetime” as a property of values.)
18
u/[deleted] Sep 19 '26
[removed] — view removed comment