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

Erica Sadun erica at ericasadun.com
Tue Jan 26 18:46:21 CST 2016


Module use case is to identify the source of a call, just like everything else.

https://gist.github.com/erica/3aa2cea3ab6d2acd56b4 <https://gist.github.com/erica/3aa2cea3ab6d2acd56b4> 

-- E


> On Jan 26, 2016, at 4:58 PM, Chris Lattner <clattner at apple.com> wrote:
> 
>> 
>> On Jan 26, 2016, at 1:48 PM, Erica Sadun <erica at ericasadun.com> wrote:
>> 
>> What do you think of:
>> 
>> #file, #lineNumber, #column, #symbol (e.g. Swift.Dictionary.init), #module, #contextDictionary
>> 
>> and calling it a day?
>> 
>> * using contextDictionary allows expandability and can subsume all existing context elements, indexed presumably by the same names
>> * renaming function to symbol takes care of self.dynamicType as well
>> * file and lineNumbers are gimmes
>> * column is apparently well liked by some (not going to kick someone's dog on this)
>> * adding module fills a big hole.
>> 
>> No tuples for Doug, covers some of Chris's points.
> 
> I mentioned this in the pull request:
> 
> I'd suggest:
> (file: String, line: Int, column: Int, symbol: String)
> 
> Where symbol would be the fully qualified name like "Swift.Dictionary.init”.
> 
> 
> I’m curious to hear what Doug’s concern about using tuples are.  Also, what is the use-case for #module?
> 
> -Chris

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


More information about the swift-evolution mailing list