-
I tried to hide an object parameter by using a kindof stub for that:
When I use the parameterized version I get the expected answer:
But when I use the stub the binding does not exist:
Is this a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
There's no bug here. Your definition of the
The two anonymous variables are different variables and thus there's no variable sharing between the two goals. Note that the |
Beta Was this translation helpful? Give feedback.
-
In OO languages you have the builder pattern where you can initialize an object step by step by calling methods which in turn return the same object of the same type so you are able to continue to build. What I want is to do the same with logical variables. This object parameter could be an assoc which I create with o::new. New creates the keys in the assoc. And afterwards I call other predicates which unify the values o::(new, p1(1), p2(3)). I want to make sure that the object parameter is a free variable in the beginning. All these variables which I have in the assoc could indeed also be single object variables. But I don't need them outside. And the amount of variables is growing over time. The only thing I can do is to put the object creation in a separate predicate. |
Beta Was this translation helpful? Give feedback.
Not by extending but by using the parametric object from within the wrapper object.