Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Hendrikto
· 1y ago · 0 comments
> Usually partial function application is a bug
Dude, what?
Comments
[–]
dan-robertson
1y ago
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
1y ago
It's my favorite line of the whole thing. There's so much which can be derived from that single statement.
[–]
quamserena
1y ago
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.