buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.16k stars 32 forks source link

`guard` #147

Closed giann closed 2 months ago

giann commented 12 months ago

Similar to swift guard let

fun something(str? arg) > void {
    guard (arg -> unwrapped) else { | else block is optional
        return;
    }

    print(unwrapped);
}
giann commented 2 months ago

This goes a little too far in terms of language complexity.