Calling Combinators (Decoders?) as Normal Functions

Note that this is precisely how parser combinators work in Haskell.

I think that, if I could design PARSE any way I wanted, I would do the following:

  • Define a set of underlying parser combinators as ordinary functions with a standardised interface
  • Define the dialect as being ‘syntax sugar’ on top of those functions to make them easier to use

This is basically the same principle Red uses for their GUI dialect, and I think it’s a good idea. The dialect makes ordinary usecases ergonomic, while the availability of the underlying functions means that you can integrate them into other parts of the language as needed.