Crosscut

Daily Note - 2025-06-21

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!

Yesterday, I introduced the possibility of expanding the concept of a trait to multiple types instead of just one. Let's use the word "protocol" for this expanded concept, as I think that it captures the meaning of having multiple types and multiple functions that relate them pretty well.

Here's an example of a simple multi-type protocol (using some pseudocode syntax I just invented for this purpose):

Convert := protocol A, B {
    convert := fn A -> B
}

Here we define a protocol called Convert, declare that there are two types involved, A and B, and that there exists a function called convert that takes A and returns B.

Tomorrow, let's look into how we could use this protocol.