Crosscut

Daily Note - 2025-06-09

Hey, I'm Hanno! These are my daily notes on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!

After my detour into strategy, let's take a sharp turn back to language design. Because I have questions about how to access the fields of a record. Or at least that's what I thought. As we'll see, this topic is connected to other areas of the language.

Records are composite data structures with an arbitrary number of named fields. We need a way to access those. And it would be nice to do that without having to introduce a new concept and new syntax. So while the classic . operator is on the table, let's first see if there are other ways.

I think a somewhat obvious idea is to use functions. If a record has a field x, then a function x gets created, that takes the record as an argument and returns the value of that field. (Or maybe some kind of view to read or update the field. To be determined.) I think this would be a neat reuse of an existing concept, but there are details to consider.

Hey, you! Want to subscribe to my daily notes? 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.