Re: Ann: SWI-Prolog 7.1.0

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 11/26/2013 05:03 AM, Richard A. O'Keefe wrote:
>>     - 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?

> Could it be the same as Erlang, where lists.iai.uni_bonn.de
> is an atom?

yes.

> (But lists.iai.uni-bonn.de is not; helpful tricks
> that fail at unexpected moments are false friends.)

That is not because of the '.'. It is because _ is allowed in atoms and
some people think this implies - might work too. It doesn't because it
would make useful operator conventions such as pairs key-value
impossible. The situation with . is different. Yes, it can (now) be an
operator, but only in a limited sense because 1.0 is not supposed to
become .(1,0).

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

> Something like this used to exist in Poplog and SigmaPROLOG,
> where it was an artefact of representing compound terms as
> (basically) [<atom>|<array>].  As I recall, it was an unmitigated
> nuisance.

We'll see. It breaks nothing as long as you don't use them. It is now at
your disposal. I expect people to find sensible use cases for them, in
particular for designing DSLs. If that proves not to be the case *and*
they prove to be a nuisance, they will probably become an option that
can be enabled using a flag. I prefer to avoid that as I don't like
flags very much. I would be surprised if that happens.

	Cheers --- Jan
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.