Daily Thought - 2025-02-10
Hey, I'm Hanno! These are my daily thoughts on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!
Yesterday, I introduced currying (or to be precise, automatic currying). I don't think this would work with postfix syntax. At least I don't see how. We need something different for Crosscut.
And that something are composite types. If you want to pass multiple values to
a function, you just bundle those up. If a function's parameters don't really
need explicit names, that composite value could be a tuple (e.g. (1, 2) +
). If
you think naming them is beneficial, you can make that a record (e.g.
{ a: 1, b: 2 } +
).
I like the elegance of this approach. Parameter lists of functions are not a special syntax. It's just a tuple or record pattern. You don't need a special feature for "keyword arguments", or something like that. Support for them just arises from this concept naturally, as long as you support records. Plus, the whole approach works for output values too (unlike currying).
Hey, you! Want to subscribe to my daily thoughts? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email every time I post a new one.