Re:Classes are a way of writing higher order functions
by azangru on Wednesday September 09, 2020 @01:34PM
(#24423502)
> This problem (calling functions defined god-knows-where) is not unique to OOP as opposed to FP
Well, part of that problem is solved by explicitly importing functions from individual modules, at which point you know where exactly your function is coming from.
> when your 'foo' function gets a 'frob' function passed to it as a parameter, it's anyone's guess what actual function it may be
Part of it is probably solved by static typing. The other part is that it shouldn't pose a problem, much like you probably don't have a problem passing all sorts of frobs to your map-s, and your filter-s, and your forEach-es, and your then-s
Well, part of that problem is solved by explicitly importing functions from individual modules, at which point you know where exactly your function is coming from.
> when your 'foo' function gets a 'frob' function passed to it as a parameter, it's anyone's guess what actual function it may be
Part of it is probably solved by static typing. The other part is that it shouldn't pose a problem, much like you probably don't have a problem passing all sorts of frobs to your map-s, and your filter-s, and your forEach-es, and your then-s