J. S. Choi
J. S. Choi
My inclination is to let the developer supply any Map-like object as a cache, and to supply tuple keys to `cache.has` and `cache.get` (see also #3 and #4). That way...
@zloirock: `new Map()` would basically be the memory-unbounded version of `new LRUMap(maxNumberOfEntries)`.
Yes, the question of what caching policy we should use by default (unbounded memory versus garbage-collectable weak references if possible) is complex, but it probably should go more in #3....
@michaelficarra: Ah, yes, that is true…I wonder if this disqualifies Map-like caches. Or would we be fine with using Map-likes and caching `f(+0)` and `f(-0)` the same…
@michaelficarra: Well, if we allow developers to supply custom user-supplied map-like caches, then the developer can supply a map-like object that treats `-0` specially: ```js f.memo(new MapLikeCacheThatDistinguishesNegativeZero) ``` So the...
@zloirock: Ah, yes, I had forgotten that. Let’s continue in https://github.com/js-choi/proposal-function-memo/issues/4#issuecomment-1083469058.
FYI: There are currently three active rival TC39 proposals that are trying to subsume this inactive proposal: * [Extensions operators](https://github.com/tc39/proposal-extensions) at Stage 1 from November 2020 * [Bind-this operator](https://github.com/tc39/proposal-bind-this) at...
This issue was closed to group it into https://github.com/lit/lit/issues/1391#issuecomment-1151748951, but @aomarks has now closed #1391 to split it into granular issues. Does that mean this issue should be reopened again,...
`""` as a falsy “container” is a precedent, but `[]` as a truthy container is also a precedent. I think that congruency between `#[]` and `[]` is more important than...
Has `closedby="…"` been considered as a name?