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