3 ms·
The post doesn't say it is an improvement, it says that Underscore is deservedly popular and also that both are jargon. UPDATE: I will probably clarify that in
by raganwald 14y ago
The post doesn't say it is an improvement, it says that Underscore is deservedly popular and also that both are jargon.
UPDATE: I will probably clarify that in the code. But if you want to open the door into my madness, the use case for "splat" is that it's a combinator, a function that takes a function and returns a function. So if you like "pluck" as I do, you write:
var pluck = compose(splat, get);
// ...
var totals = pluck('total')(orders);
And you wouldn't really write `splat(get('total'))` either.
Having building blocks that are combinators rather than general-purpose functions is itself a family of jargon. It's a win if you do a lot of method decoration and function composition, otherwise it's...
Clever.
- deleted 14y ago[deleted]