Re: [swift-evolution] ternary operator ?: suggestion

2016-01-06 Thread Alex Popov via swift-evolution
I like the bar `|` variation, but I do think the control value should be out front, otherwise the ? reads as an optional to my mind, whereas the former comes across as the beginning of a ternary (which this is effectively an extension of). The bar variation feels Haskell-y in a satisfying way,

Re: [swift-evolution] ternary operator ?: suggestion

2016-01-06 Thread Alex Popov via swift-evolution
You're right Charles, the confusion with the OR operator is something I neglected to mention (despite noticing it) because of my own preference.  However, I would like some kind of explicit separator between cases. If we're unwilling to reuse the `case` keyword, I hope commas will be enforced. 

Re: [swift-evolution] [Proposal idea] Support for pure functions

2015-12-21 Thread Alex Popov via swift-evolution
Slight tangent, would a guarantee of purity also allow for more Tail-Call Optimizations? A cursory glance at SO seems to point to TCO not always being applied, especially when ARC is involved. On Dec 21 2015, at 1:55 pm, Joe Groff via swift-evolution swift- evolut...@swift.org wrote: >