News for hackers. Stuff that matters.
Re:N-Params vs. Single Param by hyperhello on Thursday April 17, 2025 @03:41PM (#43721252)
Neither really addresses the issue. Making a type for a single kind of string seems like an abuse of types just to shoehorn the documentation in. Documentation can be used directly of course, but that moots all of this -- just document? Yeah, but naming the variable is super quick compared to either.
Re:N-Params vs. Single Param by oneoverten on Thursday April 17, 2025 @07:27PM (#43723334)
Variable names is just documentation. Having types that can assert some condition on the underlying value is not even comparable to "having a named return variable". (just document? just name variables?) You don't care about what the name of the returned value is, you care about what *it is*.