Re: Remarks on SWI 7

"Richard A. O'Keefe" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 28/11/2013, at 12:19 AM, Jan Wielemaker wrote:
> 
> A standard that _prescribes_ that length(2,0) should fail silently is
> something I refuse to take seriously.  So yes, it is another issue.

The standard is a living standard.  It _does_ get revised.
If memory serves me correctly, in Quintus Prolog length(2, 0) raised
an error, I'm pretty sure I added the code to make that happen in
about 1983.  David H. D. Warren, the developer of the first Prolog
compiler, the inventor of three different VMs for Prolog, all used
in major systems, and a founder of Quintus, was keen on the
"totally defined semantics" of Prolog.  But Kennita Watson, the
first technical writer at Quintus, was even keener on the idea that
she shouldn't get unannounced unpleasant surprises, so that our
customers wouldn't.

So Kennita taught me to think that having length(2, 0) raise an
exception is a good idea.

I would be happy to see the standard change here, and systems
change to conform to the revised standard.

The standard *is* a living standard and while the standard says
that this must fail quietly *now*, that's something that *could* be
changed if a case was made and agreed to.  The thing to do is not
to kick the standard *as a whole* -- and Prolog programmers with it --
in the slats, but to lobby for a change.

The irony here, of course, is that one of the effects of the change
to the empty list (ALONE amongst the vast range of atoms used to
terminate recursive structures) is precisely to introduce quiet
failures into code that used to work...
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.