Re: [swift-evolution] [Pitch] Expose assert configuration functions in standard library

2016-06-01 Thread Erica Sadun via swift-evolution
> On Jun 1, 2016, at 9:15 AM, Erica Sadun wrote: > > Or, to be honest: > > /// Offers user-facing public assert configuration test > @_transparent > public > func isDebugAssertConfiguration() -> Bool { > return _isDebugAssertConfiguration() > } > > which covers, I

Re: [swift-evolution] [Pitch] Expose assert configuration functions in standard library

2016-06-01 Thread Erica Sadun via swift-evolution
Or, to be honest: /// Offers user-facing public assert configuration test @_transparent public func isDebugAssertConfiguration() -> Bool { return _isDebugAssertConfiguration() } which covers, I believe, about 98% of the demand for this feature -- E > On May 31, 2016, at 11:21 PM, Brent

Re: [swift-evolution] [Pitch] Expose assert configuration functions in standard library

2016-05-31 Thread Brent Royal-Gordon via swift-evolution
> My pitch: I want to promote these three helper functions to the standard > library and remove their underscore prefixes. These functions currently have implementations like this: @_transparent @warn_unused_result public // @testable func

Re: [swift-evolution] [Pitch] Expose assert configuration functions in standard library

2016-05-29 Thread Jacob Bandes-Storch via swift-evolution
Am I understanding correctly that -Onone → _isDebugAssertConfiguration is true -O → _isReleaseAssertConfiguration is true -Ounchecked → _isFastAssertConfiguration is true ? If the goal is to expose the optimization level to user code, might I suggest something like enum

[swift-evolution] [Pitch] Expose assert configuration functions in standard library

2016-05-29 Thread Erica Sadun via swift-evolution
Back in March, I somewhat foolishly agreed to pick up the gauntlet for a series of community-requested proposals centered on build configurations. Requested items included: A way to test for destination platforms like Apple, Linux, Windows, Unix-like, UIKit-supporting, etc A way to test for