[swift-evolution] Analysis of case conventions for initialisms

Marco Masser lists at duckcode.com
Fri Feb 12 04:14:40 CST 2016


Strong dislike for #2. I understand and accept the benefits, but I just don’t like how that looks.

I also don’t use #1 or #3. Instead, initialisms in my code are always all uppercase, no exceptions.

For type names, I can’t remember a case in my code where that could not be avoided or was too bad to read.
For local variables, methods, and functions, I try to find a name that puts the initialism at the end of the name, e.g. let publicationURL = document.URLForPublication

In my experience, my guidelines don’t always work. Just like everyone else’s.


> On 2016-02-12, at 06:51, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
> I just posted a write-up about various case conventions for initialisms:
> https://gist.github.com/dabrahams/55fc5ece355da4664730.  I was surprised
> at how it turned out, FWIW.
> 
> Cheers,
> 
> -- 
> -Dave
> 
> _______________________________________________
> 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