Daily Thought - 2024-10-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!
This thought was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.
I've been envisioning (and previous Caterpillar prototypes have already done
this) using [
and ]
for list literals:
[ a b ] # `a` and `b` have the same type
I think that's a pretty common thing to do.
Following Rust's syntax, I'd like to use (
and )
for tuples:
( a b ) # `a` and `b` can have different types
And since I'm considering a syntax change that would free
up {
and }
, those could be used for map and struct/record literals:
{
x: 5
y: 10
}
There are more details to figure out, but those are the broad strokes of what could go into the language.
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 whenever I post a new one.