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

> Usually partial function application is a bug

Dude, what?





I think this is true. It can be easy to accidentally do partial application, especially with optional and labelled arguments, eg:

  let bar x y z = …
  let foo w x = bar x (f w x)
The performance and evaluation order can be a bit surprising in this case, and the errors when updating bar can be hard to understand.

It's my favorite line of the whole thing. There's so much which can be derived from that single statement.

I would rather have partial function application be explicit rather than just omitting args because right now if you accidentally forget an argument (a bug) it isn’t an error there and instead becomes a type error somewhere else.



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

Search: