Re: [swift-evolution] Beyond Typewriter-Styled Code in Swift, Adoption of Symbols

2017-09-01 Thread AndréZephyzVidela via swift-evolution
eviate this problem woud make “3” + “4” a type error (since strings are not a commutative monoid) > On 1 Sep 2017, at 03:27, John McCall <rjmcc...@apple.com> wrote: > >>> On Aug 31, 2017, at 8:51 PM, André “Zephyz” Videla via swift-evolution >>> <swift-evoluti

Re: [swift-evolution] [Pitch] Support for pure functions. Part n + 1.

2017-02-17 Thread AndréZephyzVidela via swift-evolution
> But given the scope capturing nature of closures I was actually wondering if > this 'purity' should be applied to closures. I think It should, pure closure cannot have outside references and therefore cannot create reference cycles even though they are escaping. I tend toward using the =>

Re: [swift-evolution] [Pitch] Support for pure functions. Part n + 1.

2017-02-16 Thread AndréZephyzVidela via swift-evolution
+1 I think it's a very interesting proposal and here is why: - It improve readability by expressing intent. For example the difference between those two function, just by their signature, is obvious: func update(_ m: Class) -> Class and func update(_ m: Class) => Class The first one mutates

Re: [swift-evolution] Proposal to change Logical NOT Operator from exclamation mark ( ! ) to something else

2017-02-15 Thread AndréZephyzVidela via swift-evolution
As of today, this is possible: prefix operator ¬ prefix func ¬ (value: Bool) -> Bool { return !value } let t = true let f = ¬t I have to admit that I quite like this but it has a couple drawbacks: 1: if you've never seen the ¬ operator in math it makes no more sense than "!" 2: It's quite

Re: [swift-evolution] for in? optionalCollection {

2017-02-11 Thread AndréZephyzVidela via swift-evolution
Ah I see you point a bit better. But I don't agree with your example, since it can be easily expressed with test?.prefix(while: { $0 != 42}).forEach { i in print(i) } But arguing about examples is besides the point, I would like to stop here. I have a question for you. How do you think we