[swift-evolution] Lambda function syntax

Rob Mayoff mayoff at dqd.com
Wed Dec 23 02:34:25 CST 2015


>
> The braces being around the type specifier as well as function body rather
> bothers me. Surely it would be more consistent just to have the braces
> around the function body, and then the type specifier preceding this?
>

If you mean consistency between closures and function declarations,
wouldn't it be simpler to go the other way?

    func tableView { (tableView: UITableView, cellForRowAtIndexPath
indexPath: NSIndexPath) -> UITableViewCell in
        ...
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151223/76f4cf40/attachment.html>


More information about the swift-evolution mailing list