[swift-evolution] [Proposal] Eliminating Swift's Screaming Snake Case Identifiers
Joseph Lord
Joseph at human-friendly.com
Tue Jan 26 20:13:59 CST 2016
Module information would be useful for a logging library, possibly to print the information but possibly also to allow different log levels (e.g. info, debug, warning, error, criticalError) to be configured for each module in a project so that log spam is manageable and possibly adjustable at runtime. (I have a fuller logging idea but have noted it is the example of out of scope and decided not to argue at this point).
Joseph
> On Jan 26, 2016, at 11:58 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> 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
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list