←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 #
1. dcdgo ◴[] No.43912118[source]
Rust Tuples can be destructured into named variables, or Enums can be used as Monads which give a label to a tuple of variables. Rust Enums are real fun to use so I encourage you to dive in. https://doc.rust-lang.org/rust-by-example/custom_types/enum....