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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b3855c7c1e6ef286 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 22 Mar 2008 14:01:04 +0100 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Naming convention for constructor functions References: <5f1f42a3-31ea-4bac-8e3e-29483474e282@i29g2000prf.googlegroups.com> In-Reply-To: <5f1f42a3-31ea-4bac-8e3e-29483474e282@i29g2000prf.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <47e50311$0$633$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 22 Mar 2008 14:01:05 CET NNTP-Posting-Host: 0c4ccfcd.newsspool1.arcor-online.net X-Trace: DXC=?NCFfnI?oEic==]BZ:afN4Fo<]lROoRA8kF0[@\S@8LAn:Ie4aamd4G X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20544 Date: 2008-03-22T14:01:05+01:00 List-Id: Lucretia wrote: > On Mar 12, 1:43 pm, Maciej Sobczak 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]