Re: Ann: SWI-Prolog 7.1.0

Alan Baljeu <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
>>    - Unquoted atoms may contain internal dots.  E.g., a.b is an

>>      atom.
>> 
>> I find this confusing given V.b is emphatically not an atom.  
>> What's the motivation?
>
>Basically convenience when handling identifiers for languages that
>can do this.  It is controlled by a flag.  So far, it seems to
>cause so little confusion that I have decided to make the default
>to accept it.  If it proves problematic we can backtrack.  Note that
>you don't have to use :-).  Following Paulo's advice, quoted write
>emits 'a.b'.

A while ago I considered using a.b as a shortcut meaning lookup a, 
then lookup b within a.  I decided against that 
because '.' was already defined otherwise and am currently 
using (a..b).  Before that I was using 'a.b' but I abandoned 
this because it ended up being too much expensive atom 
construction and parsing.

In your new notation, the above could almost be done 
something like 
A.B = a.b,
nb_getvar(A, AMap),

extract AMap.B into result.

That's what I would be inclined to do in Prolog, but I think this is
not how you intend it to work.  Ergo, confusion.

Alan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.