Re:Creating a Swift syntax extension: the Lisp 'cond' function
by bjustin on Sunday June 08, 2014 @06:32PM
(#7866171)
Interesting idea. We can support unlimited cases by using tuples and varargs, though the fallback has to be the first argument if we don't want to return an optional:
And in use:
[ Parent
| on HN ]
Re:Creating a Swift syntax extension: the Lisp 'cond' function
by aardvark179 on Sunday June 08, 2014 @06:51PM
(#7866221)
I was about to post something very similar, but was trying to check that type annotations can be applied to tulle components before posting.
I do like the idea of @auto_closure, but I bet it will confuse the hell out people reading swift code unless the IDE highlights it in some way.