logoalt Hacker News

octoberfranklinyesterday at 11:59 PM1 replyview on HN

It would be really helpful if this page showed side-by-side comparisons of the same program written in Kip and some other language, like say Haskell.

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).


Replies

joomytoday at 12:03 AM

Cases essentially act like named arguments, except the names are inferred from the case of an argument, which is inferred through morphological analysis. And that analysis can be ambiguous, so the ambiguities are solved by the type checker / elaborator. It's different from record types in the sense that you can provide the arguments in any order to a function, and the system will figure it out because of the cases.