3 ms·
An issue here is that you're going to reset your cache after every lookup instead of only on cache miss.
by masklinn 15y ago
An issue here is that you're going to reset your cache after every lookup instead of only on cache miss.
- gcr 15y agoHm? How come? `or` is short-circuiting in the sense that when we have `a() or b()`, b() is only called if a() returns something falsy. Where would the issue arise? Sure, abusing or in this way might seem hackish, but I feel like it's a net win for readability.