You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
§13.6 vs §13.6a: one comprehension family is promised, but Option/Result get a second syntax and the bracket form over an Option is refused #2960
Errata #2955 item 4. §13.6: "There is one comprehension family, polymorphic over its target". §13.6a: Option and Result comprehensions are for x in a; y in b: yield x + y (statement form without yield), and the compiler refuses [x + y for x in a for y in b] with "a for over an Option or Result is a one-clause comprehension (§13.6a)". Either the bracket form admits Option/Result carriers (one family, as §13.6 says) or §13.6 stops claiming one family. Eric's ruling.
D185: ruled (spec v7.35, #2970): the bracket form over Option/Result yields the carrier of the element; the yield expression form is retired; the statement form stays. Implementation next.
Implemented by #2990 under D185: the bracket comprehension over an Option or Result first clause yields the carrier of the element; the yield expression forms are retired; the statement form stays.
Activity
ehartford commentedon Nov 2, 2026
D185: ruled (spec v7.35, #2970): the bracket form over Option/Result yields the carrier of the element; the
yieldexpression form is retired; the statement form stays. Implementation next.D185 (#2960): one comprehension family; the bracket form over Option …
ehartford commentedon Nov 2, 2026
Implemented by #2990 under D185: the bracket comprehension over an Option or Result first clause yields the carrier of the element; the yield expression forms are retired; the statement form stays.
D185 (#2960): one comprehension family; the bracket form over Option …
D185 (#2960): one comprehension family; the bracket form over Option …