Re: [] \= '[]' (was Re: Ann: SWI-Prolog 7.1.0)

Paul Singleton <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Organization Jambusters Ltd
Message-ID <[email protected]>
On 27/11/2013 07:37, Richard A. O'Keefe wrote:

> One important thing to remember is that not all Prolog data is
> generated by Prolog, and not all SWI Prolog data is generated
> by SWI Prolog.

Indeed, e.g. JPL presents traditional Prolog's *abstract* syntax to 
JVM languages as an obviously corresponding class hierarchy:

   Term
       Variable
       Integer
       Float
       Atom
       Compound(Atom, Term[])

It is unaware of lists or any other term-encoding convention, and 
supports them all.

Jan's [] is a new, single-valued primitive type, and JPL will not work 
with existing apps under V7 unless this classic term model is extended.

At the heart of the current debate is a disagreement on the sacredness 
of this term model.

For me, it is sacred (if anything, I want to simplify it, but that's 
another topic).

For Jan, it's OK to complicate it as long as an elegant and 
coder-friendly illusion can be maintained at the source code level (is 
that fair? I'm not trying to denigrate it).

I always expected to see developments in concrete syntax, layered over 
the classic syntax (which would live on as an increasingly hidden 
legacy markup language), layered over the classic term model 
(untouchable unless we can find and justify smart generalisations 
which are fully backward compatible).

I have a large investment in Prolog code, a considerable amount of it 
dependent on metaprogramming and introspecting the classic term model 
(memoing, cycle-detecting meta-interpreters, deep indexed terms in 
secondary storage, interfaces to other languages, etc. etc.) and never 
expected this to be broken.

A year ago, I gambled my business (literally) on SWIPL and its 
httpd/HTML support, forsaking ten years of JavaServer Pages and MySQL 
(how quaint that seems now) to fulfil a government contract in what I 
felt confident was a smarter infrastructure for agile development of 
modern web apps.  Experience so far has vindicated this faith, but I 
am *seriously* spooked to be sidelined into a --traditional mode.

Hope this helps!

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