> On Mar 25, 2016, at 6:34 AM, John Siracusa via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Thanks for the explanation. I think this last part gets at the heart of my 
> question: Why isn't it important to highlight word boundaries in this case?
> 
> On Fri, Mar 25, 2016 at 1:24 AM, Chris Lattner <clatt...@apple.com 
> <mailto:clatt...@apple.com>> wrote:
> Swift is an “opinionated” language and we find snake case to be ugly (YMMV of 
> course).
> 
> My attempt to summarize/rephrase the overall answer: "We used up all the 
> word-boundary-highlighting conventions that we don't find ugly on other parts 
> of the language, and we don't want to reuse any of them due to the potential 
> for conflict and confusion.”

I’m sorry for the confusion.  There are two issues: whether it is important to 
highlight word boundaries, and if so, what approach to use.  The first (and 
longer) part of the email was intended to justify why we don’t highlight word 
boundaries for keywords.  My overly snarky answer at the end was an attempt to 
answer why we don’t use snake case, but it wasn’t very effective :-)

Here is a different way to look at it: if we were going to highlight word 
boundaries, we would do it with camel case.  We use camel case in other places, 
and it has advantages over snake case (shorter identifiers), so we wouldn’t 
introduce a new way to do it.  

> As for snake case being ugly, my mileage does vary (obviously). Ithink 
> thereadability costofnot highlightingwordboundaries outweighsthe 
> aestheticconcerns. But them's the breaks when it comes to aesthetic issues, I 
> suppose. And in the grand scheme of things, at least the total number of 
> declaration modifiers should be small… :)

I understand the concern.  The short version of the argument is that multiword 
keywords and declmodifiers are rare , primitive, and used in idiomatic ways so 
the opportunity for confusion is low.

-Chris

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to