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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: _Type vs no _Type Date: Fri, 05 Nov 2010 13:15:20 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <82zktq4n9b.fsf_-_@stephe-leake.org> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1288977304 15877 192.74.137.71 (5 Nov 2010 17:15:04 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 5 Nov 2010 17:15:04 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:5mF13STLicKTTETjP2J/HEwNCgk= Xref: g2news2.google.com comp.lang.ada:16239 Date: 2010-11-05T13:15:20-04:00 List-Id: Jeffrey Carter writes: > Here is the core of the _Type argument: It helps avoid thinking. It avoids thinking about one mundane aspect of the program. The argument is: save your "thinking" for more important things. >... Given a > problem, a coder sits down and starts writing code; a S/W engineer > thinks about the problem. You're getting perilously close to an ad-hominem. I don't much like the "_Type" convention, either, but I'm not going to accuse people who disagree of being less than competent. At AdaCore, I never, ever think about how many blanks to indent by. There is an AdaCore law that it's 3, and I obey that law without thinking (and have my editor do it automatically). I'd prefer 4, myself, but getting creative at this level is a Bad Thing. And calling oneself "engineer" doesn't make one better at making software. >...Thinking is thus the defining characteristic > of the S/W engineer, and attempting to avoid thinking the antithesis of > S/W engineering. That doesn't follow -- the fact that I avoid thinking about "3 blanks to indent" doesn't mean I avoid thinking. Likewise, people who avoid thinking by using "_Type" do not avoid thinking altogether. There are some cases where it is very wrong to come up with "meaningful" names. In particular, a parameter of a general-purpose subprogram, when named notation is inappropriate. In such a case, a single-letter name, or (a variation on) the type name, is exactly right. - Bob