Re:The Curious Case of Swift's Adoption of Smalltalk Keyword...
by Spivak on Sunday June 14, 2020 @11:09AM
(#23518212)
I don’t think named arguments are as much a problem as function overloading and optional parameters for this.
Without overloading you could define the answer as
g(x) { f(fst:x, snd:y) }
always which would make partial application somewhat ergonomic but makes allowing fst without snd horribly ugly when you have to pass in some spiritual null or _ to.
I think these ideas are fundamentally opposed and so I don’t think there’s a good way to have a nice syntax for both.
Without overloading you could define the answer as
always which would make partial application somewhat ergonomic but makes allowing fst without snd horribly ugly when you have to pass in some spiritual null or _ to.I think these ideas are fundamentally opposed and so I don’t think there’s a good way to have a nice syntax for both.