Closed garfieldnate closed 1 month ago
You could also make the attribute name be |nil|.
I will go with converting to nil
(plus printing a warning), based on the existing behavior exhibited below:
sp {foo
(state <s> ^superstate nil ^superstate <sup>)
-->
(<s> ^<sup> hi)
}
step
p s1
The output is:
(S1 ^epmem E1 ^io I1 ^nil hi
^reward-link R1 ^smem L1 ^superstate nil ^type state)
When you pass null as the attribute name when you create a WME via the SML API, it is automatically converted into the empty string (
""
) without issuing any warnings.The output is
(I2 ^ 1)
(which is not great output syntax, see https://github.com/SoarGroup/Soar/issues/484).On the one hand, the empty string is really the only logical possible value here, but on the other hand it is a silent conversion and has a high likelihood of being a bug of some sort. It would be difficult to throw an error now, because that would break existing code, but I think printing a warning is warranted.