2 ms·
> I'll emit such a dictionary from a closure if for example I need to precompute a lookup table to be used for multiple related calls Isn't this analogous to u
by freetime2 5y ago
> I'll emit such a dictionary from a closure if for example I need to precompute a lookup table to be used for multiple related calls
Isn't this analogous to using private methods, though? I.e. you have some logic to precompute the lookup table that isn't accessible to users of your dictionary of functions? Am I misunderstanding how this works? Or are there benefits of this approach vs. for example having a private method "precomputeLookupTable()" that gets called in a class constructor?