gosukiwi / Blueberry

A beautiful programming language with clean syntax which compiles to PHP
MIT License
63 stars 10 forks source link

Ternary Operator #3

Closed gosukiwi closed 11 years ago

gosukiwi commented 11 years ago

Implement ternary operator as such

title = (age > 18) ? "Mister" : "Boy"

Also, consider the following operator

age = getAge() ?? 18

That would translate as

$age = getAge() ? getAge() : 18;