I’m using: SWI-Prolog version 8.1.9.
I’ve been reading about Prolog dictionaries for a while but so far have avoided them because I don’t understand the nuances of them:
My concern is that some subtle nuance in the behavior of dicts will bite me somewhere down the line when I use them in a complex search or scan. Is there anything you can’t do with a dictionary field that you can do with plain Prolog term?
For example, if I wanted to pull out a single field in a dict item and use it’s value for a choice point in a Prolog goal, will I discover that there are differences in how the code would behave compared to a plain Prolog term?
The problem is my current mental images have to do with either JSON objects or SQL records whereby to do anything with a field in an object or a record (respectively), you first have to pull up the object/record from a collection, and then do your work on the retrieved object/record. I worry that Prolog dicts will have the same or similar behavior.