Coding 2023-08-03
Another rough day, but I stumbled across what was a missing piece of the puzzle in NABTO's "design". Here are the three things I want to try to build it up around:
- An effect system that works with the type system (like in Koka)
- Modular implicits (like in this paper)
- Gradual typing with some kind of sensible runtime semantics for the dynamic type
That last goal very obviously complicates the design and implementation of the other two. My feeling on this is that a language with explicit effects and modular implicits in an ML-style module and type system would be extremely interesting, but I want to see if it's possible to have gradual typing too.
(One other thing I've been rolling around in my head is the concept of marking an effect as "must be performed".)
There are... a lot of things that would need to be investigated and reconciled to see if all of this even makes sense, but now I feel like I have a specific goal to work towards. Stuff of note:
- Koka vars, unlike OCaml refs, interact with the effect system.
- I want effects, though not necessarily all effects, to be arbitrarily resumable, which means that the runtime needs to be written really carefully, especially in conjunction with gradual typing.
- Modular implicits offer an alternative way to lay out some fundamental standard library modules, so that needs to be looked into.
- OCaml also has a bunch of language extensions that seem useful for NABTO, but I don't fully grasp the tradeoffs and limitations involved.
- I don't know what I want function calls to look like.
- I want to see how stuff like Trio's design would work with Koka-style effects.
- And generally the kinds of utility libraries that languages have.
- Also I need to know more about Perceus.
Thinking about all of this, it kind of seems like my best bet for actually accomplishing anything here is to figure out how to articulate the vision I'm going for in a way that would convince people who, um, actually understand this stuff to put work in.
I'm going to get ready for bed now. Until I get some inspiration for how to write about this stuff persuasively, I can mess with parsing, or maybe some cursed Lua I put together recently.
Good night.