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
I think I want the opposite. I want to be able to say "during this dynamic extent, you may not read from the database." but then I'm sure some fool would just hoist all the pure logic out of that extent in order to intermingle it with the fetching logic one layer up.
1
3
This seems like you are describing co-effects here, but I could be wrong. The Granule language is doing cool stuff with this - cc.
I think it's a bit different. Coeffects "turn the arrows around" but in the cases I'm thinking of, I think the things are still fundamentally effects, but it's more that you want to treat some effects as everywhere by default where they aren't explicitly disabled
3
1
Frank's ambient effect is basically this. By default, the ambient effect is empty but I think you should be able to change it to what you want. Kitten also has some defaulting like this IIRC.
1




