3 ms·
Author here. Thanks for the nice summary. You've expressed it better then I would. I am not 100% sure about the structured concurrency concept myself, but comp
by rumcajz 9y ago
Author here. Thanks for the nice summary. You've expressed it better then I would.
I am not 100% sure about the structured concurrency concept myself, but comparing it to structured programming feels reassuring. Basically, a tree structure (whether a syntactic tree or the tree of running coroutines) is probably the most complex way to structuring stuff that's still tractable by a human being. Once you go beyond that, you'll eventually get lost. Thus, tools enforcing a tree-like structure are likely to be helpful to keep the program maintainable.
- igravious 9y agoI like the idea of structured tree-like concurrency, fits my brains. About your API though. Why is there a load of inet/ip/socket functions, shouldn't they be in a separate lib? Why is the opposite of the fn int go(expr) the fn int hclose(int) and not the fn int stop(int) or something like it. open/close – go/stop – and so on …
- rumcajz 9y agoThe socket functions were once in a separate library but it's just easier to use like this. Linking with 1 library, not having to care about version mismatches etc. My recommendation would be to just not use the socket functions and link with the library stitically. That way the unused code will be discarded. As for hclose() that was just mimicking the POSIX close() function.
- igravious 9y agoGotcha. Okay.