New #rustlang blog post, about "move expressions", an idea that came up after my last post on ergonomic ref counting: smallcultfollowing.com/babysteps/bl...
4 reposts22 likes
New #rustlang blog post, about "move expressions", an idea that came up after my last post on ergonomic ref counting: smallcultfollowing.com/babysteps/bl...
4 reposts22 likes
This idea is getting even closer to "partial/mixed-mode captures" bsky.app/profile/hjvt... Mixing capture modes between the pre-|| keyword and specifiers inside the body feels dirty though, and moves closures further from functions as well.
I haven't thought about this too hard, but I think explicit captures might have some nice interactions with theoretical partial borrows. In this case it'd could be a "partial capture by clone": move(cx.request_name.clone()) || { foo(cx.request_name); // request_name is a "partial clone" here }
This totally reminds me of multi-stage programming 🤔 okmij.org/ftp/ML/MetaO...