From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c39ad3e35a7690a9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.74.201 with SMTP id w9mr5672773pbv.0.1328955463151; Sat, 11 Feb 2012 02:17:43 -0800 (PST) Path: wr5ni11911pbc.0!nntp.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Convention for naming of packages Date: Sat, 11 Feb 2012 11:17:41 +0100 Organization: Ada @ Home Message-ID: References: <4f355230$0$21451$ba4acef3@reader.news.orange.fr> NNTP-Posting-Host: cOsGXo1g/JfIRrlUYM+jrg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.61 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-02-11T11:17:41+01:00 List-Id: Le Sat, 11 Feb 2012 10:22:18 +0100, Simon Wright a = = =C3=A9crit: > In most cases the subprogram name tells what it does, and the object > parameter might just as well be called 'This'. As for the other > parameters .. my style recommendations, which may seem a bit odd but > were derived from experience (of others' sins!) are > > As a matter of style, always name parameters from the point of view= > of the operation's caller, not from your point of view as > implementer. Try to make the names read well, especially if the > caller uses named parameter association: That's why I was looking for a name for that too. Your comments exclude = = =E2=80=9CMe=E2=80=9D as an option, because although short, this express = a point of view = from the inside. Same comment with Self, which is just a longer variant= of = Me. =E2=80=9CThis=E2=80=9D is indeed fine. Except that as I use Instance= _Type for the = (main) type name when the purpose of the package is to define a type, th= is = logically suggest Instance as the parameter name. I feel it's too long. = So = I though using This_Type instead of Instance_Type could be an option, bu= t = failed to see it as natural, and feel =E2=80=9CObjects.This_Type=E2=80=9D= does not read as = nice as =E2=80=9COjects.Instance_Type=E2=80=9D do. Someone with another = opinion? Well =E2=80=9Cfunction F (This : Instance_Type) return Some_Type;=E2=80=9D= and =E2=80=9CF (This =3D> = Object);=E2=80=9D may read nice enough after all, even if the parameter = name and = the type name does not match well. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity