I would like to simplify some database notation, and I'm doing some tests with
UpValues for that.
For example, if I set this Upvalue fot tab1:
tab1 /: tab1.column1 = 1
When I evaluate
1 as expected. But if later I set
column1 = "x", when I evaluate it again, I get
tab1."x" instead of
1 as I need.
There is some way that I can change this behavior? So I could get
1 and prevent variables name conflict?
To avoid misinterpretation here is the evaluation sequence.
Quit the kernel and evaluate:
tab1 /: tab1.column1 = 1; column1 = "x"; tab1.column1
The result is
tab1."x" in the first evaluation.