[m-users.] Building a serialiser with an additional state

Tomas By tomas at basun.net
Sun May 9 17:09:50 AEST 2021


On Sun, 09 May 2021 05:15:28 +0200, Peter Wang wrote:
> [...] I can safely say on behalf of the Mercury developers that we
> STRONGLY recommend the use of state variable syntax instead of
> DCGs. DCG syntax is only supported because it was inherited from
> Prolog, before state variable syntax was invented.


They are different things also.

DCG syntax for accumulator pairs and nothing else was obsoleted by
state variables a decade ago, but DCGs for parsing can still be
useful.

(But not very. Continuation passing is much better.)

/Tomas


More information about the users mailing list