3 ms·
For some reason requiring the programmer to use additional syntax at the call site to mark behavioural properties of called functions is not a popular language
by fulafel 2y ago
For some reason requiring the programmer to use additional syntax at the call site to mark behavioural properties of called functions is not a popular language feature generally. I guess eg TypeScript could add it as a user extensible feature. Would it be useful to be able to require things like this in your internal API?
let gizmos = nocheckperms lookupRequestedGizmos(request);
- jayd16 2y agoYou're trading complexity for expressiveness but the await keyword syntax is essentially unwrap sugar. Dereferencing a pointer is similar syntax. It's possible to write a language where awaiting a task is done through a method on the task type. I don't think this is ideal because the whole reason you're using explicit yield points is so you can tell when something yields. Using method syntax makes that harder to see at a glance.