[swift-evolution] [Proposal] Eliminating Swift's Screaming Snake Case Identifiers
Trent Nadeau
tanadeau at gmail.com
Tue Jan 26 17:44:26 CST 2016
Instead of #contextDictionary, what about #source. If it's a dictionary, I
think that would read better:
#source['file']
#source['line']
...
On Tue, Jan 26, 2016 at 4:48 PM, Erica Sadun via swift-evolution <
swift-evolution at swift.org> 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.
>
> -- E
>
> On Jan 24, 2016, at 4:12 PM, Remy Demarest <remy.demarest at gmail.com>
> wrote:
>
> +1 I love the idea of having not-only consistent naming convention for
> compiler-magic code starting with #.
>
> And I also love the idea that source location would be one object that you
> can print to get the full story while still retaining the possibility to
> use each individual components as needed, which is probably the rarer case.
> I never find myself wanting only some of properties and usually don't
> include them simply because it takes longer to write the format properly,
> if I can get them all in one go it's certainly a win.
>
> Remy Demarest
> remy.demarest at gmail.com
>
>
>
> Le 23 janv. 2016 à 18:46, Erica Sadun via swift-evolution <
> swift-evolution at swift.org> a écrit :
>
> Pull request: https://github.com/apple/swift-evolution/pull/116
>
> -- E
>
>
> On Jan 22, 2016, at 5:40 PM, Chris Lattner <clattner at apple.com> wrote:
>
>
> On Jan 22, 2016, at 1:43 PM, Jack Lawrence <jackl at apple.com> wrote:
>
> Indeed. Here’s the grammar from TSPL:
>
> line-control-statement → #line
> line-control-statement → #lineline-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>
>
>
>
> Huh ok, I forgot we supported that. We could handle that by requiring
> that form of #line to be at the start of a line, if necessary.
>
> -Chris
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> 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
>
>
--
Trent Nadeau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160126/fbda4b25/attachment.html>
More information about the swift-evolution
mailing list