[swift-evolution] Proposal: Allow Getters and Setters to Throw

Morten Bek Ditlevsen bek at termestrup.dk
Sat Mar 12 06:59:40 CST 2016


Brent Royal-Gordon <brent at ...> writes:

When reading this excellent proposal in December, my colleagues and I had just
had a discussion about the very same topic.

I am bumping because I think it would be a great addition to the language - and 
since I have not seen the same proposal discussed in other threads.
Please excuse me if the topic has already been discussed elsewhere.

A very quick summary of the thread:
Basically Nikolai Vazquez proposes that getters and setters can be marked 
as 'throws'.
Chris Lattner responds that he thinks that the feature does not need a formal 
proposal, since the lack of the feature is an implementation detail.
Jordan Rose notes that there are subtleties of the feature that would be good to 
discuss in a formal proposal.

I would like to try and summarise the comments so far into a formal proposal 
- although the internal optimisations of swiftc regarding inout parameters is 
beyond my knowledge.

Any comments on whether the feature is a good idea - or whether a
formal proposal is the next step to take?




More information about the swift-evolution mailing list