2,066 karma · joined February 5, 2010
Because one of these is not like the others. You can play Soccer with four stones and a can. Consequently, legends have arisen from the working class, sometimes from abject poverty. We can say with certainty that there are not thousands upon thousands of people who could run circles around Cristiano Ronaldo. In a sport that excludes 99% of the world's population, we can only guess.
> Indication of some degree of food insecurity was reported by 14.2% of the sample and tended to be higher amongst younger age groups, those on lower incomes, and home renters (as opposed to owners).
https://academic.oup.com/jpubhealth/advance-article/doi/10.1...
I somewhat doubt that we're talking about upper/middle classes here.
For a long, long time, the language itself lacked almost all of the niceties that make async programming bearable. Node code quickly devolved into a giant mess of callbacks nested twenty levels deep.
Seriously!?
https://twitter.com/marcatracy/status/1357806202277797889/ph...
let createMemoizer f =
let cache = Dictionary<_,_>()
let f' = fun x ->
match cache.TryGetValue(x) with
| (true,value) -> value
| (false, _) ->
let result = f x
do cache.[x] <- result
result
f'
The signature is ```createMemoizer (f:'a->'b) -> 'a->'b```, which is not very telling, especially if it is returned by yet another function, so that even the createMemoizer name is lost. In classic OO, I'd just get a Memoizer object that carries vital documenation and what not with itself, as it is passed around. It's no even that much longer, it's just not as elegant to use. class Memoizer<TINPUT,TOUTPUT> {
Dictionary<T,TOUTPUT> cache = new Dictionary<T,TOUTPUT>();
Func<TINPUT,TOUTPUT> f;
/* ... */
public TOUTPUT Invoke(TINPUT parameter) {
if (!cache.TryGetValue(parameter, out var result)) {
result = f(parameter);
cache[parameter] = result;
}
return result;
}
}