You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Currently one has to use unique variables if a value is to be ignored.
The benefits of having the anonymous variable include:
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.
The text was updated successfully, but these errors were encountered: