For Programmers: Free Programming Magazines  


Home > Archive > Prolog > February 2005 > Re: List cons functor (was Re: The meaning of module overriding syntax mod:goal in di









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: List cons functor (was Re: The meaning of module overriding syntax mod:goal in di
Brian Hulley

2005-02-28, 8:59 pm

> So I do not understand this change in Mercury neither anybody's
> obsession with the latest brand of the list constructor:
> any convention seems ok and harmless enough not to want
> to change it.


But it is not what convention you use for the *list* constructor that
is important: what is important is that the full stop is a really
really really great symbol and it is totally wasted if it is just used
for some obscure theoretical pretend list constructor when everyone
uses the bracket notation. Of course there needs to be some theoretical
list constructor so that all compound terms can be broken up with the
=.. relation, but it could be something very obscure like
'$listConsConstructor' - '[|]' just happens to be the most logical
choice for the reasons Joachim Schimpf gave in his original post.

Anyway it is currently possible to still make use of the dot without
making it a normal operator, by allowing it to form "qualified
predicate names" in the same way that the dot is used to form a
floating point number from two whole numbers so that it would be
possible to introduce a special notation for hierarchical modules that
would be similar to java eg

:- import graphics.3d.*.

graphics.3d.canvas.draw(square,10,20,30,40)


Cheers - Brian.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com