> On May 24, 2016, at 10:07 AM, Erica Sadun <[email protected]> wrote: > > The where clause is not a stylistic flourish because it is still best used to > constrain conditions that are semantically > related to conditions. Upon acceptance as now, there are no compiler checks > that mandate any relationship.
From a semantic perspective, at least, 'where' and ',' don't really matter to the compiler. Either one is an "and" composition of the list conditions. -Joe > The difference is that (1) coders will be allowed to move Boolean assertions > out of where clauses when there is no > relationship, and (2) they will be allowed to order the statements as > desired. Under the current system, all boolean > clauses must be conjoined and expressed as the first item of the list (except > after availability clauses, as the one exception) > > -- E > >> On May 24, 2016, at 11:01 AM, Xiaodi Wu <[email protected]> wrote: >> >> With the implementation of your proposal, will there be anything that can be >> written in where clauses that cannot be written after a comma (in the >> context of guard statements specifically)? If not, does the where clause >> become entirely a stylistic flourish? >> On Tue, May 24, 2016 at 11:57 Erica Sadun <[email protected]> wrote: >> There is no way I could figure out how to restrict Boolean assertions to >> mentioned variables therefore I left where clauses entirely untouched. >> I'd recommend people adopt in-house standards where Boolean assertions in >> where clauses should be semantically tied to the condition >> clause that introduces them. >> >> I will add this as a note. >> >> -- E >> >> >>> On May 24, 2016, at 9:29 AM, Xiaodi Wu <[email protected]> wrote: >>> >>> Does this proposal distinguish between "where clauses [...] restricted to a >>> Boolean assertion tied to variables connected to the binding or pattern >>> condition" and "unrelated Boolean assertions [that] should be allowed to >>> stand on their own"? >>> >>> Or are both types of boolean assertions now permitted either following a >>> comma or following a where clause? > _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
