comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de>
Subject: Re: Naming convention for constructor functions
Date: Sat, 22 Mar 2008 14:01:04 +0100
Date: 2008-03-22T14:01:05+01:00	[thread overview]
Message-ID: <47e50311$0$633$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <5f1f42a3-31ea-4bac-8e3e-29483474e282@i29g2000prf.googlegroups.com>

Lucretia wrote:
> On Mar 12, 1:43 pm, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> 
>> I can also imagine Create_T, Construct_T, etc., but Make_T seems to be
>> the shortest while still conveying the meaning properly. Is it also
>> most widely used?
> 
> IIRC, the style guide mentions both Make_T and Create_T. I can image
> Constructor_T being a pain to type after a while, the first 2 convey
> meaning and are short, so I'd pick one of those.

As Gene has said, Constructor_T is a noun and therefore likely
to be mistaken for a type or object. A convention used
with Ada->JVM-Code compilers is New_T.

I've also seen nested factory packages P used; in this case
there is just P.Make without the type's name in the constructor
function.

As for "pain to type", I can hardly grasp the measure of stunning
ineffective ... stupidity that programmers seem to show when it
comes to using a computer for editing. There is *no* excuse
whatsoever to ignore editing programs and their capabilities of
"typing on command". Most editing programs are even better at
expanding than the mercilessly "helpful" automatic rewriters
in URL input fields or whatever is used in mobile phones.
This is true in particular of lauguage sensitive editors, such
as Emacs with Ada mode, GPS, ADT for Eclipse,  Gnatbench for
Eclipse, etc. etc..

You cannot become a carpenter if you don't know how to use a saw
for cutting wood.
How can you become a programmer if you don't know how to use
a computer for writing program text?

When someone complains that word XYZ is a pain to type he acts
like an apprentice complaining that it is a pain to drill a hole
using finger nails. [End of Steam]



      parent reply	other threads:[~2008-03-22 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 13:43 Naming convention for constructor functions Maciej Sobczak
2008-03-12 15:15 ` Lucretia
2008-03-22  1:31   ` Gene
2008-03-22 13:01   ` Georg Bauhaus [this message]
replies disabled

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