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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e55245590c829bef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: Japanese,JIS Path: g2news2.google.com!postnews.google.com!26g2000yqv.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? Date: Mon, 1 Nov 2010 14:49:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: <64e4ec1c-5336-449a-b37a-72e5e753bfa4@26g2000yqv.googlegroups.com> References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> NNTP-Posting-Host: 174.28.254.71 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1288648176 11173 127.0.0.1 (1 Nov 2010 21:49:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 1 Nov 2010 21:49:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 26g2000yqv.googlegroups.com; posting-host=174.28.254.71; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16104 Date: 2010-11-01T14:49:36-07:00 List-Id: On Nov 1, 3:01 pm, Jeffrey Carter wrote: > > >> S/W engineering involves putting in the effort to think of good names for > >> everything in your code. "_Type" is a kludge to avoid doing that thinking. > > > True enough. > > Well, if you're going to admit to not being a S/W engineer, then we can ignore > anything you have to say :) Well, that is completely ignoring the artistic portion of Computer Science... to say that "names must be meaningful" involves a subjective [and arguably artistic] context within which to judge the "meaningfulness" thereof. For example the names [一番の作, 二番の作, 三番の作,四番の作]* likely mean nothing to you; but to the Japanese programmer (and quite probably the Chinese one) these are the quite meaningful identifiers 'first work', 'second work'. 'third work' and 'fourth work' where "work" is completely analogous to task and [perhaps] the context is that of a scheduling-system which only needs/ allows for four arbitrary tasks. Furthermore, as I explained [or tried to], in the case of a specification which may be used by someone else then the goal actually IS to be unambiguous and alleviate the 'thinking' required by someone reading/using the code. We don't want the manager or the junior-programmer to spend five minutes on trying to understand if it is an object or a type which you are referring to. In natural language the distinction doesn't really exist [to my knowledge] and it is relied upon the context to [implicitly] determine what is meant. Perhaps, as a way of example we could say that the following verbosity could provide the proper distinction and allow for the "proper" naming of both types and variables: Push( Stack as Variable : in out Stack as Type; Item : in Integer ); which could be used as: Push( Stack => Forth.Data_Stack, Item => 23 ); in a hypothetical implementation/interface of/to a Forth interpreter.