[swift-evolution] [Proposal] Eliminating Swift's Screaming Snake Case Identifiers

Greg Titus greg at omnigroup.com
Fri Jan 22 16:10:35 CST 2016


You could make these identifiers act like {get set} vars in order to support the current behavior of #line. E.g. LLDB and playgrounds would use `#line = 12; #file = “foo.swift”` instead of `#line 12 foo.swift`.

	- Greg

> On Jan 22, 2016, at 2:04 PM, Jack Lawrence via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I also use it in a similar way in playgrounds to inject some hidden preamble code and then rewrite the location of diagnostics.
> 
> Jack
>> On Jan 22, 2016, at 1:48 PM, Jordan Rose <jordan_rose at apple.com <mailto:jordan_rose at apple.com>> wrote:
>> 
>> It's mainly used by LLDB to make sure user-visible line numbers make sense even in the presence of textually-inserted code.
>> 
>> Jordan
>> 
>> 
>>> On Jan 22, 2016, at 13:43, Jack Lawrence via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>> 
>>> Indeed. Here’s the grammar from TSPL:
>>> 
>>> line-control-statement → #line­
>>>  <>line-control-statement → #line­line-number <https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html#//apple_ref/swift/grammar/line-number>­file-name <https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Statements.html#//apple_ref/swift/grammar/file-name>>>  <>line-number → A decimal integer greater than zero
>>>  <>file-name → static-string-literal <https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/swift/grammar/static-string-literal>>> 
>>>> On Jan 22, 2016, at 1:39 PM, Chris Lattner <clattner at apple.com <mailto:clattner at apple.com>> wrote:
>>>> 
>>>> 
>>>>> On Jan 22, 2016, at 12:20 PM, Jack Lawrence via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>>> 
>>>>> `#line` already exists in the language, how will you deal with this?
>>>> 
>>>> It does?
>>>> 
>>>> -Chris
>>>> 
>>> 
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
>> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160122/d3f8b0f8/attachment.html>


More information about the swift-evolution mailing list