Part of me is annoyed that await makes it too difficult to insert a benign effect somewhere without tagging tons of stuff async. Another part of me is annoyed that it is too easy to insert malignant effects everywhere just by haphazardly tagging tons of stuff async.
Conversation
This is another reason I don't really believe that typeful programming will improve your designs. This code is TypeScript; somebody just willy-nilly added "async" and "await" until the thing type checked. The type system guided them towards doing exactly the wrong thing.
3
2
5
Like if every function in your Haskell program is inside an IO monad, tracking that in the type signature is not helping you. "At least it's explicit so you can have a conversation about it" you may think, and I would too, but then async/await goes and proves that's not true.
4
5
You can write shitty code in any language. Not sure what point youβre making about types here.
As far as async/await goes, having to tag a function explicitly as await or not, with no other option, is a design choice of TS. One could easily imagine polymorphism over effects...
3
2
Yeah, a massive problem with async/await, checked exceptions etc is the lack of polymorphism. Leads to much duplication and manual propagation of effects. ππ


