[swift-evolution] SE-0005 ==> Please keep well know acronyms capitalized!

Pavel Kapinos kapinos at twobytesoftware.com
Thu May 19 17:20:34 CDT 2016


Thanks, Doug.

Sure, I see it now more clear in the light of NS prefix being dropped. Still, I am not quite convinced by your example as it is "on purpose”, while URLHandler is a real thing. But I guess, old habits die hard. Have a good day!

Cheers,
Pavel.

> On May 19, 2016, at 3:14 PM, Douglas Gregor <dgregor at apple.com> wrote:
> 
>> 
>> On May 19, 2016, at 2:01 PM, charles--- via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> 
>>> Well known acronym capitalization is pervasive in Cocoa APIs and as a result it enables fast and easy comprehension and writing a good quality code.
>> 
>> 
>> I could reply "they are confusing because they look like class names and clearly cause a higher number of errors in code.” 
> 
> FWIW, this became an actual problem in practice with the introduction of SE-0069 (https://github.com/apple/swift-evolution/blob/master/proposals/0069-swift-mutability-for-foundation.md <https://github.com/apple/swift-evolution/blob/master/proposals/0069-swift-mutability-for-foundation.md>), which bridges “NSURL” to a value type “URL”, so
> 
>   var URL: URL
> 
> becomes an actual, practical problem that consistent lowerCamelCasing of values avoids.
> 
> 
> 	- Doug
> 
>> 
>> My *actual* view is that both forms cause problems, so it doesn't much matter which we go with. 
>> 
>> Sent from my iPhone
>> 
>> On May 19, 2016, at 1:30 PM, Pavel Kapinos <kapinos at twobytesoftware.com <mailto:kapinos at twobytesoftware.com>> wrote:
>> 
>>> Hi Charles,
>>> 
>>> Thank you for your feedback! But we are not talking here bad or good names per se. Well known acronym capitalization is pervasive in Cocoa APIs and as a result it enables fast and easy comprehension and writing a good quality code. IMO it is quite important for future preservation in Swift 3. Have a good day!
>>> 
>>> Cheers,
>>> Pavel.
>>> 
>>>> On May 19, 2016, at 1:20 PM, charles at charlesism.com <mailto:charles at charlesism.com> <charlesism.com at gmail.com <mailto:charlesism.com at gmail.com>> wrote:
>>>> 
>>>> I don't believe there's a correct answer here. Both urlHandler and URLHandler are bad names (for instances). Since we're stuck with camelCase, bad names are a fact of life.
>> _______________________________________________
>> 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160519/d1321bc4/attachment.html>


More information about the swift-evolution mailing list