Daily Thought - 2025-03-06
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!
In addition to records, I had also planned to have tuples in the language. A tuple would have been much like a record, except that its fields were to be anonymous, meaning they wouldn't have names. And without names, the order of fields would have to be significant, while in a record, it is not.
But having both records and tuples seems to go against the spirit of "simple, orthogonal, and composable". Wouldn't it be more orthogonal and composable to just have records, but allow their fields to be anonymous? But then we'd have fields where ordering is important mixed with others where it's not. We could make all fields ordered, but that seems limiting.
The solution is as simple as it is (in retrospect) obvious: Don't have tuples
(and any anonymous fields) in the language. (This idea came from a conversation
with Adrian Sieber, who started helping me with language design.) You can
always use a record with fields like a
, b
, or something along those lines.
In view of that alternative, I don't think that tuples carry their weight.
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.