Peter Ludemann on Nostr: npub1sys4g…eckr3 I could have told you that async is a bad idea, just as it was a ...
npub1sys4gja5v6r2pmsyan8ntwye9txrhzfe6yq4rnjt8jf6vguujuas5eckr3 (npub1sys…ckr3)
I could have told you that async is a bad idea, just as it was a bad idea with IBM mainframes in the 1970s (I have painful memories). Async isn't quite as bad with declarative languages (mutable closures are a very bad idea).
As for parsers: one advantage of parser generators is that they guarantee the grammar is unambiguous. PEG, with its "first match" rule, is another way to avoid ambiguity, although it feels too operational to me.
(See also DCG in Prolog, which can handle left-recursion using "tabling", a variant of memoization.)
I could have told you that async is a bad idea, just as it was a bad idea with IBM mainframes in the 1970s (I have painful memories). Async isn't quite as bad with declarative languages (mutable closures are a very bad idea).
As for parsers: one advantage of parser generators is that they guarantee the grammar is unambiguous. PEG, with its "first match" rule, is another way to avoid ambiguity, although it feels too operational to me.
(See also DCG in Prolog, which can handle left-recursion using "tabling", a variant of memoization.)