DEV Community

Ryan Bae
Ryan Bae

Posted on

Progress on STAR (EOM)

Some Context

For one, I've changed the name from EOM (Explicit, Organized, Minimal) to STAR. Another thing, I've mostly finished the expression parser, the AST exec/eval, and now hacking away at the statements.

What Actually Changed?

Well, for starters, the language can now parse 2+3 to add(2, 3), and can now do struct initializers (expression: create Name(Arguments)) and function calls (expression: Name(Arguments)). The only things I need to add are now null terms (null(number), null(string)), and mix-fix operators (if _ then _ else _). For the AST, I need to implement the casting case, and the bridge thing for my language. While STAR is still in development, I made some concepts for STAR v2, v3, and probably v4. Here's some concept code:

// async
domain {
    print("Hello!")
}

print("World!") // prints immediately

// explicit scope
scope {
    let thingThatNeedsNewScope = some_function(":)")
    print(thingThatNeedsNewScope)
}
Enter fullscreen mode Exit fullscreen mode

Here's some other ideas:
new(_) makes a wrapper (domain or scope) without any external scope information
persist and discard are manual lifetime keywords; you can extend a variable out of the scope, or delete it from anywhere.
• more math functions
• eventual C++ rewrite

Suggestions are greatly appreciated!

Top comments (0)