Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: