logoalt Hacker News

jstriebtoday at 2:46 PM2 repliesview on HN

I like currying because it's fun and cool, but found myself nodding along throughout the whole article. I've taken for granted that declaring and using curried functions with nice associativity (i.e., avoiding lots of parentheses) is as ergonomic as partial application syntax gets, but I'm glad to have that assumption challenged.

The "hole" syntax for partial application with dollar signs is a really creative alternative that seems much nicer. Does anyone know of any languages that actually do it that way? I'd love to try it out and see if it's actually nicer in practice.


Replies

emihtoday at 2:58 PM

Glad to hear the article did what I meant for it to do :)

And yes, another comment mentioned that Scala supports this syntax!

rocquatoday at 3:01 PM

Someone else in the comments mentioned that scala does this with _ as the placeholder.