[swift-evolution] [Proposal] Eliminating Swift's Screaming Snake Case Identifiers
dgregor at apple.com
Tue Jan 26 23:19:17 CST 2016
> On Jan 26, 2016, at 7:41 PM, Brian Gesiak via swift-evolution <swift-evolution at swift.org> wrote:
> I have no strong feelings on the proposal, but I would like to confirm that the behavior will remain the same--this simply changes the name of these identifiers, is that correct?
> I ask because swift-corelibs-xctest and the Objective-C XCTest SDK overlay use `__FILE__` and `__LINE__` as default parameters for assertion functions (see: https://github.com/apple/swift-corelibs-xctest/blob/73ff15ac353e6596bf314d66f90e1471043cf071/Sources/XCTest/XCTAssert.swift#L158 <https://github.com/apple/swift-corelibs-xctest/blob/73ff15ac353e6596bf314d66f90e1471043cf071/Sources/XCTest/XCTAssert.swift#L158>). These currently evaluate to the callsite of the function: calling `XCTAssert(true)` in a file named "Foo.swift" expands to `XCTAssertTrue(true, file: "Foo.swift")`.
> As we attempt to replicate the Objective-C XCTest API in swift-corelibs-xctest, we're beginning to rely on these identifiers more (see: https://github.com/apple/swift-corelibs-xctest/pull/43 <https://github.com/apple/swift-corelibs-xctest/pull/43>). It would be quite the setback if the behavior of the identifiers changed on us, so I just wanted to confirm that this proposal is only discussing naming, not behavior.
This proposal does not change the behavior; #sourceLocation default arguments (or whatever we name it) will still be expanded at the call site. The Swift standard library depends on this fairly heavily, too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution