[swift-evolution] [Review] SE-0023 API Design Guidelines
Jacob Bandes-Storch
jtbandes at gmail.com
Sun Jan 24 18:26:57 CST 2016
Nasa doesn't read fine to me; it's never stylized that way. Radar does, and
scuba, because they've been appropriated for use as non-capitalized words
over time in the language. I understand the difference, but I don't think
the useful distinction (for purposes of this discussion) is between
acronyms and initialisms. You probably can't find acronyms that are
stylized as sentence-/lowercase, but you can certainly find initialisms
that aren't (e.g. NASA).
Jacob Bikeshed-Swift
On Sun, Jan 24, 2016 at 3:13 PM, Dave Abrahams via swift-evolution <
swift-evolution at swift.org> wrote:
>
> on Sun Jan 24 2016, Charles Kissinger <swift-evolution at swift.org> wrote:
>
> >> On Jan 23, 2016, at 10:39 PM, Douglas Gregor <dgregor at apple.com> wrote:
> >>
> >>>
> >>> On Jan 22, 2016, at 9:34 PM, Charles Kissinger
> >>> <crk at akkyra.com
> >
> >>> <mailto:crk at akkyra.com>> wrote:
> >>>
> >>>>
> >>>> On Jan 22, 2016, at 3:59 PM, Trent Nadeau via swift-evolution
> >>>> <swift-evolution at swift.org
> >>>> <mailto:swift-evolution at swift.org>>
> >>>> wrote:
> >>>>
> >>>> Under "Follow case conventions", how should acronyms (like "HTML") be
> handled: HTMLElement or HtmlElement?
> >>>
> >>> I would certainly prefer the second style. Unless the acronym comes
> >>> at the end of the identifier, it is more readable when only the
> >>> first letter of the acronym is uppercase, IMO. Otherwise the
> >>> acronym merges with the capitalized first letter of the following
> >>> word.
> >>>
> >>> Using all caps for acronyms also doesn’t work very well at the start
> of a variable name, leading to:
> >>>
> >>> var hTMLElement = HTMLElement()
> >>>
> >>> versus:
> >>>
> >>> var htmlElement = HtmlElement()
> >>
> >> Interesting. For me, it feels like the acronym should should up in
> >> ALLCAPS or nocaps; never with just a Leadingcap. For example:
> >>
> >> var htmlElement = HTMLElement()
> >>
> >
> > I guess I just don’t like my function calls SHOUTing at me. :-)
> >
> > The leading-caps-for-acronyms style might not be particularly
> > popular. The most prominent use I’m aware of is in the .NET
> > frameworks.
>
> Peeple, please. Not to pick nits, but these are *initialisms*, not
> *acronyms*
> (http://www.dailywritingtips.com/initialisms-and-acronyms/). The
> difference matters, because there's a very good argument for using
> different conventions for the two, i.e. Nasa and Radar (acronyms) read
> fine while Html and Fbi and Cia (initialisms) ... don't.
>
> --
> -Dave
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160124/4416ae87/attachment.html>
More information about the swift-evolution
mailing list