comp.lang.ada
 help / color / mirror / Atom feed
From: Optikos <optikos@verizon.net>
Subject: Re: Type naming conventions: Any_Foo
Date: Fri, 6 Dec 2019 07:30:53 -0800 (PST)
Date: 2019-12-06T07:30:53-08:00	[thread overview]
Message-ID: <276cc5bd-29d8-4bee-8379-c3384f889d4e@googlegroups.com> (raw)
In-Reply-To: <f5b3464a-21de-4d75-858a-054178434d54@googlegroups.com>

On Thursday, December 5, 2019 at 4:51:36 AM UTC-6, AdaMagica wrote:
> Of all of these schemes, my favorite is
> Package Foos

In this or any other naming convention that utilizes plural, the convention must eventually inform what to do (in English) with nouns that
a) are the same in both plural & singular (e.g., fish, deer); and
b) have no plural, such as noncount/mass-count nouns (e.g., furniture, software); and
c) the plural (if it exists) most likely refers to the type-of not the (microscopic) instance-of due to using measure words for referring to the (microscopic) instances of (e.g., flour [as dust] versus flours as type of flour; [grain of] sand versus sands as type of sand; [kernel of] rice/corn versus rices as types of rice/corn]); and
d) the plethora of measure words, especially for demarcating plural of individuals or of groups (e.g., lions as multiple individuals versus pride of lions as a cohesive group versus prides of lions as multiple of multiple); and
e) nonconforming foreign-import plurals (e.g., courts marshal; attorneys general); and
f) acronyms & initialisms, especially when the pluralized noun in the acronym or initialism is not the final word (e.g., should certificates of deposit be CDs and attorneys general be AGs since it is not certificate of deposits and attorney generals?); and
g) Latin-derived plurals versus English-derived plurals (e.g., radii versus radiuses both being perfectly correct & widely accepted in English).

(Of which f is the most pedantic in a case-insensitive language such as Ada, because usually the nonagreement is DVDs versus Dvds and CDs versus Cds, not CsD, and AGs versus Ags, not AsG.)

Given all that opportunity for debate, there is some wisdom in rejecting English plurals per se to instead:
A) always add -s when the singular phonetically ends in not-s and always add -es when the singular phonetically ends in -s, as in mouse->mouses, ax->axes, axis->axises.
or
B) always use the same affix as prefix or suffix, as in Pkg_Foo or Foo_Pkg.

Option B makes scripting automation especially easy in the build environment or in source-code generation or refactoring, so that the scripting need not have AI-esque knowledge of English (or an artificial-artificial intelligence of a giant human-curated look-up table).


  parent reply	other threads:[~2019-12-06 15:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 13:56 Type naming conventions: Any_Foo Alejandro R. Mosteo
2019-12-04 14:52 ` Lucretia
2019-12-04 16:42   ` Alejandro R. Mosteo
2019-12-05 10:51     ` AdaMagica
2019-12-05 17:27       ` Jeffrey R. Carter
2019-12-05 17:45         ` Dmitry A. Kazakov
2019-12-05 20:03           ` Jeffrey R. Carter
2019-12-05 21:51             ` Dmitry A. Kazakov
2019-12-05 23:12               ` Randy Brukardt
2019-12-06 20:20                 ` Jeffrey R. Carter
2019-12-07  1:19                   ` Randy Brukardt
2019-12-06 20:18               ` Jeffrey R. Carter
2019-12-06 20:35                 ` Dmitry A. Kazakov
2019-12-07  0:57                   ` Randy Brukardt
2019-12-07 10:28                     ` Jeffrey R. Carter
2019-12-07 12:36                       ` Niklas Holsti
2019-12-08 12:04                         ` Jeffrey R. Carter
2019-12-07 10:13                   ` Jeffrey R. Carter
2019-12-07 11:21                     ` Dmitry A. Kazakov
2019-12-08 11:55                       ` Jeffrey R. Carter
2019-12-08 12:38                         ` Dmitry A. Kazakov
2019-12-08 14:31                         ` Shark8
2019-12-08 21:58                           ` Jeffrey R. Carter
2019-12-09 22:47                             ` Shark8
2019-12-07 23:24                     ` Jere
2019-12-08 12:14                       ` Jeffrey R. Carter
2019-12-09 22:07                         ` Randy Brukardt
2019-12-05 19:49         ` Niklas Holsti
2019-12-05 20:47           ` Jeffrey R. Carter
2019-12-05 21:33             ` Niklas Holsti
2019-12-06 11:44               ` Lucretia
2019-12-06 20:23                 ` Jeffrey R. Carter
2019-12-06 20:11               ` Jeffrey R. Carter
2019-12-06 20:46                 ` Dmitry A. Kazakov
2019-12-06 21:55                 ` Niklas Holsti
2019-12-07 10:19                   ` Jeffrey R. Carter
2019-12-07 12:05                     ` Niklas Holsti
2019-12-08 11:59                       ` Jeffrey R. Carter
2019-12-06  8:57       ` AdaMagica
2019-12-06  9:55         ` J-P. Rosen
2019-12-06 15:30       ` Optikos [this message]
2019-12-07  3:34 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox