> I wonder if it would help to document the grammar changes necessary in the 
> proposal.

I'm preparing a revision with that information.

> I also wonder how it could affect the getter shorthand? Couldn't the 
> following work for subscripts?
> 
>    subscript(idx: Int) throws -> Element { ... }
> 
>    // the above is shorthand for
>    subscript(idx: Int) -> Element {
>        get throws { ... }
>    }

A shorthand is a definite possibility, especially for subscripts where both 
accessors might need to throw because of an invalid index, but I decided to 
keep it simple. I'm also worried that it might encourage people to mark 
accessors as throwing when only one actually needs it.

> Not sure how this could be extended to work with general computed vars. This 
> doesn't feel right:
> 
>    var x throws: Int { ... }

Yeah, that's another problem.

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to