Coding 2026-06-11
All right, here's where I stand. Now that I think about it, I feel bad for not even touching the synthesis code, so let's just pop that open.
... And basically just poked it a little with a stick. I prefer where it's at now, to where it was, but I don't think the changes I made (adding some NewType usage) are groundbreaking or anything.
Before that, I broke up the concatenative language code in a way that may make sense. I feel like I have two avenues for getting further with this stuff. One is getting some hands-on experience with the interpreter and the untyped version of the language. The other is planning out getting the typing working.
Let's think about the typing design. I want to have ascription, which means I need some way to associate a type with a word. I think I want to do this by making opaque-at-runtime "type values", and adding a constant word for ascription. This approach means that higher levels of abstraction should be more-or-less ready to go, in terms of dealing with types.
Now, as far as expressing types, I kind of want to try making the notation also concatenative. It's like this concatenative program has a bunch of things embedded in it, written in a sub-language that is also concatenative. But given that the goal is to construct a value, perhaps it makes sense to not bother with fancying it up before I've checked whether the broader ideas work.
And the big idea I need to evaluate is whether it makes sense to say "some words need to know their input types, and some words need to know their output types". If I go down this route, I think I want to have a single type check/inference method that always returns the inferred result, it just maybe allows you to pass in nothing. And then typing an expression involves letting you avoid specifying a portion of the type.
Anyway, it just occurred to me that I also need to consider record types, if I'm going to try to soup this up into an ML. For destructuring, a field is a kind of word, except that, for structuring, hm. Well, a field is something, and there is some kind of word that applies a field to a value to extract the nested value. Perhaps the sensible thing is to have an empty record, and an operation that writes a field and a value into a record, which kind of implies that fields are another kind of value, and there's a word for get, and a word for set.
Okay, it's late, need to get to bed.
Good night.