+1=1 became false between versions 8.5.5 and 8.5.10. How and why?

The query +1 = 1 succeeds in older versions, but at least since 8.5.10 it fails :thinking:

~ $ docker run -it swipl:8.5.5 swipl -g "((+1=1, write('true\n')) ; (write('false\n'))), halt. "
true
~ $ docker run -it swipl:8.5.10 swipl -g "((+1=1, write('true\n')) ; (write('false\n'))), halt. "
false

(Unfortunately the versions in between are not on docker.)

The newer result seems to be “the right thing to do”, but where can I find an explanation of this change in behavior? Was something changed about +/1 or about the way matching is done here?

Is there a general changelog file available or only the posts here on discourse for each individual release?

Thank you in advance for any help and suggestions!

I take this to mean the release category


If this means one long text file with all of the changes aggregated then I know of none.


A better way but not always user friendly way is to read the GitHub commits directly. Granted what you seek may not be identifiable by descriptions for the commit but seeing the files the code is in and knowing what each file does can help, granted it takes months to years of reading the code to get a good sense of what each file does.

#devel_commits

Alternatively, go to the download page (SWI-Prolog downloads) and follow the ChangeLog link. That gives a page with the latest release changelog and a menu that allows selecting a range of versions. Select 8.5.5 and 8.5.10 and search for + and you find

[Jan 26 2022]

MODIFIED: Read +digits as a term rather than a number. This changes also removes the space when writing e.g. +42. Reading +digits as a number predates the ISO standard and current practice. It was in SWI-Prolog since version 2.5 …

2 Likes

Thank you, all clear now! And my apologies for not finding the (very useful) devel changelog page earlier.