3 ms·
The problem is there are subtle differences between implementations that bite you in ways you never thought possible, and it's just aaaargh hard to get the same
by danieldk 11y ago
The problem is there are subtle differences between implementations that bite you in ways you never thought possible, and it's just aaaargh hard to get the same program running in the same way on two different Prologs.
Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system relies quite heavily on blocked goals and working around this change turned out to be too expensive.
(If I recall correctly ;).)
Another example is SWI Prolog diverging from the ISO standard in version 7 (e.g. double quoted strings are now a type on their own, rather than a list of character codes). Luckily, there is a --traditional flag for older code.
In both cases, there are good reasons for the changes, but it makes portability hard.
Edit: wanted to add that this is not intended to be a critique of these particular (great) implementations of Prolog.
- YeGoblynQueenne 11y ago>> Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system relies quite heavily on blocked goals and working around this change turned out to be too expensive. When you say "blocked goals" do you mean it like: :-block(a_block). % ... stuff ... :-end_block(a_block). That sort of thing? Anyway yeah, sounds typical :/ With Swi I hurt a little recently when an update screwed up some of my stuff but then that was my fault for doing hacky tricks and trying to use modules as they're not meant to be. >> In both cases, there are good reasons for the changes, but it makes portability hard. Oh indeed. I started using 7.x the moment it was out pretty much, knowing that it means I'm tied to Swi for good and bad, but there's much more good than bad and so far I haven't regretted it.
- danieldk 11y agoWhen you say "blocked goals" do you mean it like: These: https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.html/mpg_002dref_002dwhen.html#mpg_002dref_002dwhen https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.ht... https://sicstus.sics.se/sicstus/docs/4.0.7/html/sicstus/Block-Declarations.html https://sicstus.sics.se/sicstus/docs/4.0.7/html/sicstus/Bloc...
- YeGoblynQueenne 11y agoAh, OK, when/2 -cheers :)