[swift-evolution] [Pitch] Make `default` function parameter values more transparent
adrian.zubarev at devandartist.com
Sat Jun 11 08:35:21 CDT 2016
I just installed the current Swift 3 snapshot to play around with it (last from may crashed my Xcode all the time).
I wanted to re-build a small project with (currently implemented) Swift 3 changes. Basically I had to look up on GitHub what the default value for deinitialize(count:) function was for UnsafeMutablePointer, just because Xcode and the docs can’t tell me that:
/// De-initialize the `count` `Pointee`s starting at `self`, returning
/// their memory to an uninitialized state.
/// - Precondition: The `Pointee`s at `self..<self + count` are
/// - Postcondition: The memory is uninitialized.
public func deinitialize(count: Int = default)
To cut it short:
Could we make default function parameter values more transparent in Swift 3?
Why are default parameter values translated to default rather than the actual value?
Can we make this independent from docs?
Sent with Airmail
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution