Re: Ann: SWI-Prolog 7.1.0

Alan Baljeu <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
   - Lists are no longer represented as .(H,T).  Instead, the list

     functor is now '$cons'(H, T).  The empty list is still [], but
     this is not an atom.  I.e., '[]' == [] fails.

I distinctly remember the awkwardness of coding expressions where 
a term could be an atom or a list, and running into [] being both.
I expect my code would break with this change but it's for the best.

   - By default, double quoted "text" is mapped to an object of type
     string.  This already raised some discussions.


I had trouble using number-list strings because it further confuses 
things when you can't distinguish list(int) from string.  But using
atoms was inefficient.

   - Quoted atoms are no longer operators.


Like Haskell.  Good idea.

   - 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?

   - functor() is valid syntax.  It produces a term that is distinct
     from 'functor'.  The `block' operator '()' to hack this syntax
     has been removed.

So call(plus(), 2,3,X) is now a thing?
I used to wish for this syntax, but now I can't remember why.

Alan Baljeu
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.