Post #2149701
2026-04-29 16:24 UTC
@dougmerritt @munificent After reading this, I started to wonder if there's a way to automatically defer promise/future resolution until the value is actually needed. Something along the lines of:
buf = ReadFileIntoNewBuf (filename);
// buf is of type Promise
do_stuff();
do_more_stuff();
do_stuff_with_file_contents (buf);
// buf is automatically resolved; possibly promoted to type uint8_t[], or ResolvedPromise.
I'm almost certainly not the first to wonder about this...
Replies (1)
-
@dougmerritt@mathstodon.xyz 2026-04-29 16:29
@ewhac Maybe not, but useful solutions are always welcome, so feel free to continue wondering. @munificent