-
Notifications
You must be signed in to change notification settings - Fork 5
Description
When trying to come up with a concise and explicit way of splitting/copying & merging of streams I came to conclusion that either there'll need to be support for "live variables" as e.g. Mech lang does (where every variable is basically by default live - very cool concept allowing to cut down SLOC count by about an order of magnitude in fullstack apps - but the problem currently is performance as this requires quite novel methods of optimization of the generated assembly which is not yet researched enough).
Or there'll need to be some select/poll/kpoll support and subsequently support for recognition from which stream the value came. This recognition of origin is sometimes done with the typing system, but that might be too cumbersome for Til. In Til I'd probably try to abuse the extraction syntax 😉.
Maybe even rudimentary things like this could be the starting point (because they can be presumably wrapped by a procedure):
select (range 0 10) (range 5 100) (io.in) | transform x {
....
} | case (>x 10) {
...
}
The latter solution sounds more reasonable for Til. It partially overlaps with own pipe primitives.