top | item 45765042

(no title)

mordnis | 4 months ago

Couldn't the same thing be said about functions that accept allocators?

discuss

order

butterisgood|4 months ago

I start to want a Reader Monad stack for all the stuff I need to thread through all functions.

charlieflowers|4 months ago

Yeah, these kinds of "orthogonal" things that you want to set up "on the outside" and then have affect the "inner" code (like allocators, "io" in this case, and maybe also presence/absence of GC, etc.) all seem to cry out for something like Lisp dynamic variables.

metaltyphoon|4 months ago

I don't think so because the result of calling an allocator is either you got memory or you don’t, while the IO here will be “it depends”

chotmat|4 months ago

I don't get it, what's the difference between "got or don't" vs "it depends"?