buzz-language / buzz

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

Inline if or ternary #95

Closed giann closed 1 year ago

giann commented 1 year ago
num N = args.len() > 0 ? args[0] : 1000;

| or

num N = if (args.len() > 0) args[0] else 1000;
InKryption commented 1 year ago

I think inline if reads clearer, ternary is harder to identify, and its precedence rules aren't immediately obvious.