Open st0012 opened 6 years ago
I thought you wouldn't adopt ternary operators in Goby 😲
Yep I didn’t want to support this, but this is kind of a basic component to programming language I think
Is this something people have complained about not having?
Not yet, just I think it would be. But it might also because we don't really have much users for now.
Just a thought, do you want to do something like in Python style (although Goby is referenced to Ruby style syntax):
hello = 'world' if created? else 'nothing'
But this style is kind of like inline conditional which is addressed in #580
@Maxwell-Alexius I prefer using Ruby style because python style might confuse users
Would you guys let me try to attack this in my free time? I love Ruby and Go, and have tried working with compilers/interpreters before, so I feel like it wouldn't be such an idea to attempt something like this.
@spavikevik sure, feel free to work on it 😄
For example:
foo ? bar : baz