Re: Ann: SWI-Prolog 7.1.0

Aleksey <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <27164512.gUgW4bmoIj@tarkus>
Hi Jan

Sorry for being ignorant, but I can't understand example with multi-lists from 
documentation:

> Using '[]' as list terminator prevents dynamic distinction between atoms and lists. 
As a result, we cannot use type polymorphism that involve both atoms and lists. 
For example, we cannot use /multi lists/ (arbitrary deeply nested lists) of atoms. 
Multi lists of atoms are a in some situations a good representation of a flat list that 
is assembled from sub sequences. The alternative, using difference lists or DCGs is 
often less natural and sometimes demands for `opening' proper lists (i.e., copying 
the list while replacing the terminating empty list with a variable) that have to be 
added to the sequence.

Could you please give some simple example.


On Friday 22 November 2013 16:36:56 Jan Wielemaker wrote:
> Hi,
> 
> I have uploaded SWI-Prolog 7.1.0. As the major release indicates, this
> makes SWI-Prolog a different system. You find more elaborate
> documentation including motivations in the chapter "SWI-Prolog
> extensions" in the manual.
> (http://www.swi-prolog.org/pldoc/man?section=extensions).
> 
> I understand that this move will make some users deeply unhappy. I am
> also convinced that (SWI-)Prolog badly needed some refreshment that
> enables smoother integration with modern IT platforms while making the
> language appear more natural to new users. The key issue is that
> many of us need a language to write applications that talk to other
> systems and not only a language that can "solve N-queens very elegantly,
> but in splendid isolation". Don't worry, it can still solve N-queens
> very elegantly, especially using Markus' clp(fd).
> 
> I would like to thank all people that provided feedback on the original
> proposal.
> 
> Vitor Santos Costa has expressed that he likes most aspects of the
> current proposal, which makes it likely that YAP users can enjoy
> these gadgets too at some point in the future.
> 
> Below are the highlights:
> 
>    - 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.
> 
>    - By default, double quoted "text" is mapped to an object of type
>      string.  This already raised some discussions.
> 
>    - The system introduces `maps' as primary citizens.  Maps are
>      collections of key-value pairs, optionally typed. Maps are
>      supported by read and write.  The syntax is
> 
> 	type{key1:value1, key2:value2, ...}
> 
>      Keys in a map can be addressed using the functional notation
>      Map.Key.  User functions on maps can be accessed as Map.Compound
>      (e.g., Vector.multiply(V2)).
> 
>    - Quoted atoms are no longer operators.
> 
>    - Unquoted atoms may contain internal dots.  E.g., a.b is an
>      atom.
> 
>    - functor() is valid syntax.  It produces a term that is distinct
>      from 'functor'.  The `block' operator '()' to hack this syntax
>      has been removed.
> 
>    - The `block' operators [] and {} remain.
> 
> Most of this can be disabled using "swipl --traditional". Notable this
> gets the old list datastructure and "text" as a list of character codes.
> It also disables functional notations on maps. The other syntax
> extensions remain valid as they do not cause incompatibilites by
> themselves.
> 
> I expect the system to run fairly stable.  Depending on feedback, there
> could be minor changes to the extensions.  Certainly, there will be more
> predicates operating on strings and maps and more of the libraries will
> be prepared to work with these extensions.
> 
> 
> 	Enjoy --- Jan
> 
> 
> ========================================
> SWI-Prolog Changelog since version 6.5.3
> ========================================
> 
>   * CLEANUP: Renamed `meta_atom' into `reserved_symbol'.  This is a mostly
>     internal name, only showing up when using blob/2 on [].
> 
>   * FIXED: edit/0: file detection and edit/1: allow for file.<ext>
> 
>   * FIXED: Map.put(New).
> 
>   * FIXED: specify access as access([read,write]).  Map-based option
>     processing does not allow for multiple options with the same name.
> 
>   * ADDED: Make set_stream(S, file_name(Name)) accept a string a Name.
> 
>   * ADDED: read_term/2 option dot_lists(Bool) to read lists in traditional
>     canonical syntax.
> 
>   * MODIFIED: Deleted PL_WRT_LIST from SWI-Prolog.h.  This is no longer
>     used.
> 
>   * FIXED: char_type(X, prolog_atom_start)
> 
>   * DOC: Added desction on when to use which representation for text.
> 
>   * ADDED: Colour support for maps.
> 
>   * ADDED: Finished subterm position representation for maps
> 
>   * DOC: Added new operators to the table
-------------- next part --------------
HTML attachment scrubbed and removed
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.