Skip to content

solus 0.9

Choose a tag to compare

@septumfunk septumfunk released this 10 Feb 11:47
· 82 commits to dev since this release
54ae551

This version changes some things up. First of all, I realized that and/or were broken and probably have been for a long time lol. Second of all, I removed the if/else as an expression.

and/or short circuiting

var sol = true and "true" or "false";

The and/or keywords (or &&/||) function as the ternary now, ditching if/else as an expression so I can focus on the language being easier to write. That's because the colons seemed to bug a lot of people, so this is how they could have been removed. This functions the exact same in lua, and just how you would expect it to.

no more colons!

if false || 1 == 1
    io.println("Wow!");
while !true or !false
    break;

There's no more colons required for if/else/while/for now! No longer are you constrained by your solus overlords. Just be careful to use blocks or parentheses when you need to make sure operators and returns don't line up incorrectly.

_str metafun

This is a metafun that lets you turn objects into strings!

var pos = { x = 1, y = 2 };
val meta = {
    _str = [pos]() { "{" + str(pos.x) + ", " + str(pos.y) + "}" }
};
obj.usemeta(pos, meta);
{1, 2}

Metafuns are also now cached slightly faster :)