Hmm to be honest i dont understand step 4, to get rid of "this", there must be something more that allows using current instance as first argument of setter, the glue code seems to be missing.
The change is simple. You can think of this keyword as a different type of argument of the function. Instead of using it, we can expand the arguments list by passing the context (in actual getter/setter property definition) as the first argument (shifting rest of them).
Hmm to be honest i dont understand step 4, to get rid of "this", there must be something more that allows using current instance as first argument of setter, the glue code seems to be missing.
The change is simple. You can think of this keyword as a different type of argument of the function. Instead of using it, we can expand the arguments list by passing the context (in actual getter/setter property definition) as the first argument (shifting rest of them).
If you want to know more, I recommend to see the implementation in the library. For example here: github.com/hybridsjs/hybrids/blob/...