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: a07f3367d7,25d835bb9a4a003f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Types, packages & objects : the good old naming conventions question (without religious ware) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4ae9dade$0$6551$9b4e6d93@newsspool4.arcor-online.net> <30ad5ea8-955e-45c0-ae94-c84927cdb2b8@d5g2000yqm.googlegroups.com> Date: Sat, 31 Oct 2009 10:49:19 +0100 Message-ID: <1pldds3sao0zf$.1h9y0q8qmnks1$.dlg@40tude.net> NNTP-Posting-Date: 31 Oct 2009 10:49:21 CET NNTP-Posting-Host: 44976c70.newsspool3.arcor-online.net X-Trace: DXC=SMlMSWheE\D74okIm;?DS@McF=Q^Z^V3H4Fo<]lROoRA8kF On Fri, 30 Oct 2009 22:30:43 -0700 (PDT), Hibou57 (Yannick Duch�ne) wrote: > A quick add-on, before I forget to write it back here - comments > welcome on the assertion : > > A program language terms use the dictionary of natural language. > The natural language has some construct like predicates, adjectives, > verbs (transitive and intransitives ones), an nouns. > > some has one to one match with the concepts used in a program text : > predicates and adjectives, verbs (of both forms). Verb ~ [primitive] operation Predicate/adjective ~ constraint (e.g. "in"), indexing > Remain nouns : they may match either object of types, just because the > natural language does not make this distinction. Indeed, in every day > life, we are not talking using type and class concepts (neither our > ancestors does). No, I think this is wrong. In natural languages there is a distinction between class and instance. In English (I am not native speaker) it is the + uncountable/plural. Other languages have different means. > Thus, the word � cat �, which may either refer to Douda, my pet cat, > or to all Cat being (if I can say it this way). "the cats" In the natural languages the difference is always blurred because classes can be objects, e.g. form super classes. So in the programming languages. The types have operations of they own though rudimentary in Ada (e.g. T'Class, T'Image). You cannot separate the name spaces of them and the objects. (The same it true for subprograms.) Note that generic programming is programming in terms of sets of types. In Ada it is represented by generics and class-wides. Generic programming is considered extremely important paradigm. Here you again come to the case where a type is no more a "proper noun", but just an instance of something more unique. Note also that at the formal level type and object are strictly different. Other programming languages (like C++, Java) have failed here by not distinguishing T and T'Class. Nevertheless for the programmer, conceptually cat is-a cat, and he wants to write programs as-if x of T, were of T'Class. You can never solve this psychological problem. The language shall differentiate object and type, type and class, class and meta class and so on ad infinitum. But the programmer will flow up and down this hierarchy of abstractions choosing his objects and types at each level and names for them. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de