mavo
mavo copied to clipboard
get() has broken semantics
get(x,y)
is supposed to get the value of the y property of object x. But if x does not have a y property, then y is evaluated in the current scope so the get may return a value anyway! The "in" operator seems similarly broken, while the has(x,y)
seems to be working.
https://codepen.io/karger/pen/WNRBGaR?editors=1100
Do we really need mv-group
here?
<meta property="m2" mv-group mv-value="group(x:3,y:4)">
It causes the weird output you mention in your pen: m2: { "m2": [ "" ], "x": 3, "y": 4 }
.
Given that it is, in fact, a group, why does stating mv-group explicitly cause any change at all?
On 4/29/2021 2:25 AM, Dmitry Sharabin wrote:
Do we really need |mv-group| here? ||
It causes the weird output you mention in your pen: |m2: { "m2": [ "" ], "x": 3, "y": 4 }|.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mavoweb/mavo/issues/718#issuecomment-828971671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWSXURDLW2PSWOKSSB6HTTLD3T5ANCNFSM43YV57LQ.
Given that it is, in fact, a group, why does stating mv-group explicitly cause any change at all?
If it doesn't have mv-group
(or typeof
), it is not a group, even if its data is group(...)
.
Yes this is confusing and part of the reason why I want to eventually drop the distinction and just allow all nodes to have children and values (#590)