3 ms·
How would dispatching work exactly, e.g. how would you override valueOf or toString?
by masklinn 9y ago
How would dispatching work exactly, e.g. how would you override valueOf or toString?
- Tarean 9y agoOn retrospect I probably want it to be more like lua? f(this, other) -> f.call(this, other) obj.f(other) -> obj.f.call(obj, other) and then replace implicit this with the first argument? It is a tiny but more verbose but gets rid of all the confusion around implicit this rules so it seems like a win.