3 ms·
I would submit that the reason we still don't do async very well is because callbacks are just not a very good technique for some reason. If you look at Erlang
by ytinas 17y ago
I would submit that the reason we still don't do async very well is because callbacks are just not a very good technique for some reason.
If you look at Erlang (which the article mentions), I don't feel like I ever do the kind of Async programming he talks about here. I break the work flow into a pipeline of processes that do a specific job. I never have a process send a message to another process and waits for the answer. Every process receives some message, does it's job and then forwards the resulting message to another process.
I guess I just find this style of coding easier to reason about because every part of the pipeline is completely stateless and has a straightforward job.
- etherealG 17y agothat sounds really cool, thanks, I think I'll have to learn Erlang cause of this comment :)
- ytinas 17y agoWow, thanks! I hope you find good resources to draw from so it doesn't turn out disappointing to you. I would look at things that Joe Armstrong writes. Not so much erlweb and stuff like that.