https://pantsbuild.org/ logo
#general
Title
# general
r

ripe-gigabyte-88964

04/27/2023, 4:20 PM
Is it possible to chain
Get
calls together, like
await Get(<something>).and_then(lambda gr: Get(<something else>, gr))
?
e

enough-analyst-54434

04/27/2023, 4:34 PM
No. The ~whole point of async / await in languages that support it is to have simpler syntax than chaining combinators.
so just:
Copy code
x = await ...
y = await x...
r

ripe-gigabyte-88964

04/27/2023, 4:36 PM
People prefer that? I think I'm too Scala-brained 😆
e

enough-analyst-54434

04/27/2023, 4:37 PM
People definitely seem to prefer it in the large.
It took quite a few languages by storm as proof.
Doesn't scala support this with << or somesuch similar to Haskell?
Ah <-
r

ripe-gigabyte-88964

04/27/2023, 4:40 PM
Truthfully, I haven't coded in Scala regularly in a couple years so I forget 😅
But I always liked the chaining-style