4 ms·
> What I’m talking about more is when people make very complicated aggregation functions in order to keep state around Are we talking about languages without h
by jhgb 5y ago
> What I’m talking about more is when people make very complicated aggregation functions in order to keep state around
Are we talking about languages without handy combinators? I can imagine that in these, turning stateless functions into stateful aggregators is going to be more obscure rather than easy.
As for speed, that seems like an implementation issue. In principle a functional solution could still preserve more information for efficient code generation than a loop for which such information needs to be extracted from by complicated auto-vectorizers. In practice the environments aren't "quite there" (lack of such features as Common Lisp's compiler macros), and any potential or even realized benefits may be cancelled out by other performance issues of such environments.
- overgard 5y ago> As for speed, that seems like an implementation issue. At the end of the day though, it's still your issue, even if you can point at a 3rd party. Personally I'd rather have my fate in my own hands rather than wait on a "sufficiently smart optimizer"
- jhgb 5y agoHence my mention of compiler macros, which put the fate of the sufficiently smart optimizer into your own hands.