|
|
|
|
|
by octoberfranklin
146 days ago
|
|
Cases essentially act like named arguments ... and there are only eight argument names. Which seems... limiting. It's different from record types in the sense that you can provide the arguments in any order to a function You can provide the fields of a record in any order, and call a function with it! f { foo=3, bar=5 }
g { bar=5, foo=3 }
I still think the page needs a Rosetta Stone. |
|
I would be fine with a programming language that limited functions to 8 arguments. Not because I never have a use for more, but it's a cost I'd be willing to pay in return for my colleagues never needing more.
Pylint and ruff [0] have a check for this that is set to warn over 5 arguments, but I don't think this is enabled by default and I haven't worked anywhere where this would cause the build to fail.
[0] https://docs.astral.sh/ruff/rules/too-many-arguments/