Work to do for the first version
There are three items left before I have something minimally viable: type unification minimal support for exceptions * a language template
I will probably require a monomorphism restriction to get a working version released.
Those three requirements are still in planning.
Have worked out:
- How to express negative type assertions to support switch statements.
- How to express overloads as unions.
- The type signatures of the builtins I plan to support.
I’ve got the syntax for exceptions and a short list of exceptions. (Only division by zero and invalid array lookups.) This does prevent having a few string munging functions like
I’ve removed the ability of exceptions to contain loops to simplify the initial implementation.
It seems like they can be replaced with
I’ve worked out the builtins to support, and a sketch of the syntax of the project file.
At this point, the project file could just be TOML.
To get from minimally viable to somewhat useful, let’s avoid stuff that would be nice:
- Doesn’t need a lot of languages
- Doesn’t need an interpreter
- Doesn’t need a type system with bells and whistles
It does though, need:
The parser is not forgiving. I’m probably using megaparsec wrong, or may need to add a concrete syntax tree prior to the AST to recognize errors so I can display meaningful error messages.
Also, I love megaparsec, but it’s a recursive descent parser and that means you have to discover invalid parses manually and work around them. I’m also not exploiting the fact that it’s combinatorial, e.g. I’m not embedding syntaxes.
A major requirement of the project is that auto-generation of code integrates into the build process as seamlessly as possible. Newer build tools generally support this, but it’s often quite arcane.
I think the most direct route here is the tool is published as a self-contained library for major architectures. That
is, if you’re building to python, you’d include
tenet-python as a library and you’d import it as a custom command in
setup.py that can be installed via
That doesn’t need to be complex; all we need is a statically linked binary for the appropriate architecture and a wrapper that invokes it as a regular command line utility.