Inverted syntax: Difference between revisions
m
→{{header|Go}}: Added note about inverted syntax with assignment.
(Added Go) |
m (→{{header|Go}}: Added note about inverted syntax with assignment.) |
||
Line 369:
=={{header|Go}}==
The closest Go can get to inverted syntax for conditionals is to define a new type ('ibool' say) based on the built-in 'bool' type and then define a method ('iif' say) on the new type which takes the place of the traditional 'if'.
Simulating inverted syntax with assignment is not possible.
<lang go>package main
|