←back to thread

611 points LorenDB | 1 comments | | HN request time: 0s | source
Show context
GardenLetter27 ◴[] No.43908148[source]
It's a shame Rust doesn't have keyword arguments or named tuples to make handling some of these things easier without Args/Options structs boilerplate.
replies(5): >>43908333 #>>43908500 #>>43908653 #>>43912118 #>>43913516 #
frankus ◴[] No.43908500[source]
I work all day in Swift (which makes you go out of your way to omit argument labels) and I'm surprised they aren't more common.
replies(1): >>43914192 #
1. kevincox ◴[] No.43914192[source]
Yeah, this is one of the few things that I love about Swift. I think it gets it exactly right that keyword arguments should be the default and you can opt out in cases where the keyword is really unnecessary.