[swift-evolution] History and future of Swift's parentheses

David Waite david at alkaline-solutions.com
Fri Jun 9 18:30:54 CDT 2017


> On Jun 9, 2017, at 9:12 AM, Gor Gyolchanyan via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
>> 
>> So I wonder if any of you have had any thoughts about what Swift's parentheses-related future (or evolutionary baggage) will be?
>> 
> 
> I really wish swift used the concept of tuples **exclusively** for all purposes that involve parentheses, as well as dividing tuples into two categories:
> - Bare tuples, which do not have labels.
> - Rich tuples, which do.
> As a consequence, here's a list of statements that would become true:
> - All functions take exactly one parameter, which is a tuple.
> - All closures (a.k.a. function pointers) take exactly one parameter, which is a bare tuple.

A function would need to support a nonassignable, superset tuple in some cases such as:
- non-escaping functions
- inout parameters

> - All functions return exactly one parameter, which is a tuple.

Is or could be? Are you defining inout parameters as syntactically hidden return values?

-DW


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170609/489488ea/attachment.html>


More information about the swift-evolution mailing list