|
|
|
|
|
by cogman10
417 days ago
|
|
Seems like it'd force the rest of the pipeline to be peppered with `await` which might not be desirable "bar"
|> await getFuture(%);
|> baz(await %);
|> bat(await %);
My guess is the TC committee would want this to be more seamless.This also gets weird because if the `|>` is a special function that sends in a magic `%` parameter, it'd have to be context sensitive to whether or not an `async` thing happens within the bounds. Whether or not it does will determine if the subsequent pipes are dealing with a future of % or just % directly. |
|
In reality it would look like:
(assuming getFuture and bat are both async). You do need |> to be aware of the case where the await keyword is present, but that's about it. The above would effectively transform to: I don't see the problem with this.