-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Currently one has to use unique variables if a value is to be ignored.
The benefits of having the anonymous variable include:
- Better readability of prolog code.
- Removal of runtime overhead: there is no need to bind the anonymous variable; it unifies with anything (including other anonymous variables) without causing any variables to become bound. Binding imposes some runtime cost and avoiding it removes this (possibly small) overhead.
What many other Prolog implementations do, they just generate unique names such is _G145 for each occurrence of the anonymous variable. This is undesirable because the code becomes less readable when viewed in the debugger and doing so does not remove the runtime overhead of binding those variables.
The AnonymousVariable will be another inheritor to IValue, alongside Variable and IConcreteValue.
Reactions are currently unavailable