News for hackers. Stuff that matters.
Re:Safe dead code removal in a pure functional language by nerpderp82 on Thursday January 28, 2021 @04:20PM (#25949409)
I often use a pattern where I do a batch and group a bunch of operations baked into a tuple that describes the computation. Instead of do_thing(on_data), the intermediate pass would emit a data structure full of list([("operation_do_a_thing", on_data), ... ] and then a command executor can do the actual scheduling of the operations, serial, parallel, batched, try/except with backpressure, etc.

Separate the thing you want done from the doing it, because when you intermingle the doing-the-thing it greatly complications the scheduling logic. Think of it as a working programmers io monad.

There are no comments on this comment yet.