I'm having a hard time seeing how this is much different from record types, except that you're limited to only eight fixed record field names (one for each grammatical case).
I'm having a hard time seeing how this is much different from record types, except that you're limited to only eight fixed record field names (one for each grammatical case).
... 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.
But Kip lets you repeat cases in arguments, so you're not limited to 8 arguments for a function. In cases where a function takes multiple arguments of the same case, the order in which those arguments are applied matters, otherwise it doesn't. So if you say "any number of arguments but only 8 are named, that seems bad", I'd understand, but that is a relatively uncommon problem to run into, especially in a toy language like this that is not meant for any serious work.