> On Jan 1, 2016, at 4:21 PM, Ethan Diamond via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> FWIW I don't think the backlash to the use of ^ with Obj-C blocks was because 
> of the carat itself, but because of the inconsistency of the syntax in 
> different contexts. Sometimes the return type was after the ^, sometimes 
> before. Sometimes you had to use (^). Sometimes the carat had the name of the 
> block with it ^functionName. None of it fit in with the [object methodName] 
> syntax of the language itself. 

I’ll drop in a straight-up objection to the carat. The infix arrow syntax is 
perfectly clear, and in mathematical contexts has proved its readability since 
long before there were programming languages. Contra the proposal, there’s 
nothing wrong with this:

  func makeIncrementer(forIncrement amount: Int) -> () -> Int

The carat, on the other hand, is noise. Only habituation to Obj-C blocks makes 
it seem like anything else.

I _do_ agree that the { foo, bar in … } syntax is clumsy, both graphically and 
grammatically. Definitely not my favorite part of Swift. I don’t find the carat 
a compelling fix, however.

Cheers,

Paul

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to