At a long-ago job, a person cleverer than me wrote a bunch of classes for expressing sets where the members of the sets could change later.<p>The specific use case was for serializing objects into a database containing sets of countries, because sometimes countries merge or split or rename themselves, that kind of thing, and he wanted to be able to express, for instance, “every country except Japan”. You could write ExSet([“JP”]), serialize that to the database, deserialize it later, and check whether `“GB” in ExSet([“JP”])`, that kind of thing.<p>It knew that ExSet([“GB”]) | InSet([“BR”]) simplifies to just ExSet([“GB”]), because “all countries except england” logical-or’ed with “just Brazil” was equivalent to the former.<p>It knew that ExSet([“GB”]) | ExSet([“JP”]) simplifies to just ExSet([]) “all countries”. It knew pretty much all the logical operations, too.<p>It was neat, but the implementation was too math-y and not performant enough, and... countries just don’t change often enough for all the complexity it added. But, I now I can say that I used the concept of intensionality on the job.
I thought Dennett introduced the distinct spellings in The Intentional Stance (Bradford 1987). We needed the distinction working with Belief, Desire & Intention (BDI) agent architectures where all three are explicitly represented See Bratman Israel & Pollack .. forgotten the reference but that was Martha Pollack; and Bratman is the Philosopher.
Rappaport's co-author Stuart Shapiro is that one of <i>Common Lisp: An Interactive Approach</i>.<p>That book does a good job explaining various nuances of how different printed syntax corresponds to the same object.