[mercury-users] Pred defns

Daniel Hazel odin at it.uq.edu.au
Thu Mar 26 15:12:40 AEDT 1998


On Thu, 26 Mar 1998, Peter Schachte wrote:

> On Wed, 25 Mar 1998, Ralph Becket wrote:
> > With the best will in the world, RTFM.  Have a look at
:-)

<cut> 
> Better still, I think there should be a specialized syntax for
> declaring DCG predicates, ideally some variation on the EDCG
> notation.  There should also be a special syntax for calling DCG
> predicates from non-DCG code; maybe something like phrase/2,3 in Prolog.
> Then the current practice of declaring and calling DCG predicates with
> 2 extra arguments should be phased out.

I wouldn't like to see the current practice phased out.
I _would_ like to see more of the libraries export predicates with a 
DCG flavour (eg have the in/out arguments of the map__ predicates
in the DCG places) so we can thread our structures a little less
verbosely.

It should be noted, anti-DCGites, you will break a world of code
if you impose any assumption that DCG arguments are lists.

Dan Hazel





More information about the users mailing list