6 ms·
All I want is named parameters so that I don't need to have N variations of the same method with different signatures, also particularly helpful for understandi
by scopendo 5y ago
All I want is named parameters so that I don't need to have N variations of the same method with different signatures, also particularly helpful for understanding boolean parameters.
- bognition 5y agoNamed parameters are great but RequestTypes are better. It lets you roll validation into the request type itself which helps clean up methods a ton
- grumpyprole 5y agoIf Java had anonymous (structural) records, then named arguments could just be a function with a parameter that has a record structural type. It could even be given syntactic sugar, something like: foo{ bar=true, baz=true }