Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Hendrikto
11 days ago
|
parent
|
context
|
favorite
| on:
Pain Points of OCaml
> Usually partial function application is a bug
Dude, what?
dan-robertson
11 days ago
|
next
[–]
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.
reply
jlouis
11 days ago
|
prev
|
next
[–]
It's my favorite line of the whole thing. There's so much which can be derived from that single statement.
reply
quamserena
11 days ago
|
prev
[–]
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.
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Dude, what?