[swift-dev] deprecating -Ounchecked

Erik Eckstein eeckstein at apple.com
Sat Nov 4 23:52:15 CDT 2017



> On Nov 3, 2017, at 10:51 PM, Chris Lattner via swift-dev <swift-dev at swift.org> wrote:
> 
> 
>> On Nov 3, 2017, at 10:23 PM, Slava Pestov via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>> 
>> 
>> 
>>> On Nov 3, 2017, at 8:57 PM, Chris Lattner via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>>> 
>>> Random question: when did you introduce -Osize, and why didn’t it go through the evolution process?  If this is a major flag that you expect users to interact with (not some obscure debugging feature) then it is part of the “UI" of Swift and seems subject to swift-evolution’s process.
>> 
>> Are compiler flags within the scope of the evolution process? -Osize has no effect on source compatibility or any other user-visible aspect of the language itself.
> 
> I don’t think there is an official policy, but IMO, all major new user visible features are in scope for evolution.

swift evolution is for the "Swift language and the public interface of the Swift standard library” (which makes sense IMO).
So command line options don’t need to go through the evolution process. For example, there could be another swift compiler, which is 100% swift compatible but provides a different option set.

But of course, we should discuss Ounchecked on swift-dev and that’s what we are doing now.

So far I got the feedback that some people still want to disable runtime checks and that’s perfectly fine.
There is no problem in keeping that code generation option in the compiler (and in fact it’s only a very small check in the optimizer) and we will test that it is functional correct. But we - the swift perf team - probably won’t have capacity to maintain performance tracking of this mode (e.g. checking and investigation of perf regressions). But hey, swift is an open source project and everyone who is interested can invest effort in this.

About the naming convention: removing runtime checks is not really an optimization mode. It’s really more comparable to -assume-single-threaded (which is maybe as important as removed runtime checks for some users). So I think it makes sense to “rename” Ounchecked.


> Random question: when did you introduce -Osize, and why didn’t it go through the evolution process?  If this is a major flag that you expect users to interact with (not some obscure debugging feature) then it is part of the “UI" of Swift and seems subject to swift-evolution’s process.

I don’t agree. Command line options are the “UI” of a swift compiler but not of the swift language.


> 
> -Chris
> 
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20171104/4a1a0af0/attachment.html>


More information about the swift-dev mailing list