News for hackers. Stuff that matters.
Re:Coconut: Simple, elegant, Pythonic functional programming by gliptic on Thursday November 04, 2021 @10:19AM (#29107515)
Or you could write it as a PEG (or indeed parser combinators) that would be even easier to read. I don't buy that verbosity on its own makes something readable and maintainable.
Re:Coconut: Simple, elegant, Pythonic functional programming by jimsimmons on Thursday November 04, 2021 @10:39AM (#29107762)
Imagine comparing diffs of a verbose parser vs diff between two complex regexes. The parser one could be 10x larger or even more, but it'd have a tractable diff. In the regex case I'd have to mentally keep track of column numbers and a bunch of other things.
Re:Coconut: Simple, elegant, Pythonic functional programming by gliptic on Thursday November 04, 2021 @10:50AM (#29107911)
PEG doesn't have that problem.