Re:Why did Prolog lose steam? (2010)
by ghusbands on Wednesday April 19, 2023 @05:51PM
(#35633754)
The sibling comment has a good general answer. In this particular case, if you use cut, it seems like it works, but then you try to solve rle([9,9,A,B,8,7], [[9,X], [8,Y], [7,1]]) or other bidirectional things and you find the cuts prevent you from finding some answers. Generally, I find that cuts (and implication and such) are prone to only work in the specific cases the programmer considered and to cause missed solutions, elsewhere.
[ Parent
| on HN ]
Re:Why did Prolog lose steam? (2010)
by YeGoblynQueenne on Thursday April 20, 2023 @02:15PM
(#35643956)
Like I say above, that's the difference between using a green cut vs. a red cut. See also my link to the RLE version in "99 Prolog Problems". So far it's been my experience that it's very hard to find a Prolog program that can't be written without a cut.