Closed ggoraa closed 1 year ago
I don't get why teal would need special syntax for this?
Right now, teal doesn't have a T?
type so it doesn't help with that, and in lua the only falsy types are nil
and false
so 99% of the time it is ok to just do if value then
.
Oh, wow, I didn't know about such syntax in Lua I will close it then
Basically something that Swift has for safely unwrapping nil values. An example of such syntax in Swift:
This syntax is basically syntax sugar for this:
It can look in Teal like this: