Crosscut

Daily Note - 2025-06-11

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!

If I'm going to consider using functions to access record fields, as opposed to building a dedicated feature (with dedicated syntax) for that, I first have to figure out how functions are defined, exported, imported, and called. And so far, I haven't done that, at least not in a principled manner.

But I think, before we can even get to that, there are some basic questions about functions to consider. This list is probably incomplete, but it's what I've come up with of so far:

  • Do we have methods, i.e. special functions that are tied to a specific type?
  • Do we support function overloading, i.e. static dispatch to multiple functions of the same name, based on the types of their arguments?
  • Do we support dynamic dispatch?
  • If so, only single dispatch, or multiple dispatch based on some or all parameters?

Without at least preliminary answers for those, I think it would be futile to try and work out anything more detailed. So over the next few days, I'll try to come up with those answers.