Daily Thought - 2025-02-17
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!
Okay, enough discussion about syntax! Let's take a closer look at the evaluation model. Consider this expression:
It's empty! And yet, this is still an expression. One that does nothing. It takes a value as input, and returns the same value as output.
It is equivalent to this one:
identity
This expression consists of an application of the identity
function which,
just like the previous empty expression, takes a value as input, and returns the
same value as output.
And this input and output are implicit. The input flows through the expression, being transformed, thereby turning into the output. To make that a bit easier to talk about, we say that at every point in the expression, there's an active value.
What this active value is, depends on the context. If this is the root context
of the program, in the current implementation, then the active value starts out
as nothing
, which is the single instance of the type Nothing
. And after the
application of identity
, it's still nothing
, because that's what the
identity
function does to it.
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.