15:34
<Jack Works>
hello I have a question
15:34
<Jack Works>
In section 13.15. https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-assignment-operators-runtime-semantics-evaluation
15:34
<Jack Works>
it writes: "Let lref be the result of evaluating LeftHandSideExpression."
15:35
<Jack Works>
but why it doesn't trigger my code when evaluating LHS?
15:36
<Jack Works>
what does it mean by "evaluating"?
15:57
<bakkot>
"evaluating" means "invoking the Evaluation abstract operation"
15:58
<bakkot>
the Evaluation semantics for a.x are here: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-property-accessors-runtime-semantics-evaluation
15:59
<bakkot>
you will note that it returns a Reference Record
15:59
<bakkot>
which just holds a reference to the property; it does not actually trigger getters/setters
16:00
<bakkot>
accessors get triggered by GetValue or PutValue, depending on whether you're reading or writing the property
16:01
<bakkot>
that is, GetValue and PutValue actually unwrap the reference record and call [[Get]] or [[Set]] respectively. but that happens as part of evaluating the thing containing a.x, and depends on whether a.x is on the left-hand side of a = or not.
16:13
<Jack Works>
Rough outline here: https://gist.github.com/rbuckton/ae46b33f383ba69880c7138c49b5e799
I love this
16:15
<Jack Works>
that is, GetValue and PutValue actually unwrap the reference record and call [[Get]] or [[Set]] respectively. but that happens as part of evaluating the thing containing a.x, and depends on whether a.x is on the left-hand side of a = or not.
thanks I understand it now
21:22
<leobalter>
bakkot: do you already have any opened issue for the extending built-ins? I don't have any concerns but the 120min timebox caught my attention.
21:56
<bakkot>
leobalter: no; we're going to put something together in the next couple weeks
21:57
<leobalter>
thanks! I'm looking forward to see it!