Re: [swift-evolution] Should we incorporate bunches of new operators / micro-syntactic sugar?

2017-12-21 Thread Chris Lattner via swift-evolution
is optional. > a =? b assigns « b » to « a » only if « b » is defined. > So if an optional is defined =? will not erase its value. > > But my real questions was… > Do you have such operators that you really use very often? > Should we incorporate bunches of new operators / micro-s

Re: [swift-evolution] Should we incorporate bunches of new operators / micro-syntactic sugar?

2017-12-21 Thread Kelvin Ma via swift-evolution
ional. > a =? b assigns « b » to « a » only if « b » is defined. > So if an optional is defined =? will not erase its value. > > But my real questions was… > Do you have such operators that you really use very often? > Should we incorporate bunches of new operators / micro-syntactic sugar?

Re: [swift-evolution] Should we incorporate bunches of new operators / micro-syntactic sugar?

2017-12-21 Thread Stephen Celis via swift-evolution
ill not erase its value. > > But my real questions was… > Do you have such operators that you really use very often? > Should we incorporate bunches of new operators / micro-syntactic sugar? > Is swift evolution the good place to discuss such question? > > I don’t want to pollu

Re: [swift-evolution] Should we incorporate bunches of new operators / micro-syntactic sugar?

2017-12-21 Thread Benoit Pereira da silva via swift-evolution
such operators that you really use very often? Should we incorporate bunches of new operators / micro-syntactic sugar? Is swift evolution the good place to discuss such question? I don’t want to pollute your mail boxes. Best regards, B > Le 21 déc. 2017 à 19:12, Stephen Celis <step

Re: [swift-evolution] Should we incorporate bunches of new operators / micro-syntactic sugar?

2017-12-21 Thread Stephen Celis via swift-evolution
Such an operator was proposed here: https://github.com/apple/swift-evolution/blob/60a8980a66a0a1341871ec323797c5547d0e0925/proposals/0024-optional-value-setter.md It was ultimately rejected: https://lists.swift.org/pipermail/swift-evolution-announce/2016-February/43.html Stephen > On Dec

[swift-evolution] Should we incorporate bunches of new operators / micro-syntactic sugar?

2017-12-21 Thread Benoit Pereira da silva via swift-evolution
Dear all, That’s not ambitious but i think worth be explored. What do you think for example of this Infix operator? « =? » allows to express optional assignments in a very concise way. // The `=? operator allows simplify optional assignements : // `a = b ?? a` can be written : `a =? b`