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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b6e97963d32ee242 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-03 10:21:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!freenix!enst.fr!not-for-mail From: Lionel.DRAGHI@fr.thalesgroup.com Newsgroups: comp.lang.ada Subject: RE: The old "Object.Method" syntax debate Date: Tue, 3 Jun 2003 19:23:55 +0200 Organization: ENST, France Message-ID: NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 1054660901 6706 137.194.161.2 (3 Jun 2003 17:21:41 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 3 Jun 2003 17:21:41 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Mailer: Internet Mail Service (5.5.2653.19) X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:38515 Date: 2003-06-03T19:23:55+02:00 | -----Message d'origine----- | De: john@nospam.demon.co.uk [mailto:john@nospam.demon.co.uk] ... | | > although using the "package" keyword leads to | > the class/module confusion that Ada currently avoid. | | That is a fair point, but it would be interesting to know how much of | the Ada code written in under the 'object-oriented' paradigm actually | uses a single tagged type per package. Over a period of around 3 years | I worked in 2 separate companies where this was pretty much the case. | In fact, in both cases the code structure was automatically generated. I don't think it's a good practice. I find awkward to create create a child for a class that perfectly fit in the same package. Simple coding rules are good, but enforcing one class per package (and calling it always "Object", or "Class") just bring Ada down to other langages that do not have a strong modularity support and use classes for this purpose. Scattering strongly coupled classes on many packages lower readability. And there is always a better name than "Object" or "Class". Similarly, calling a formal "This" is, i think, a bad practice, there is always a better name. Automatically generated code often lead to this, not only because it simplify the code generator, but because tools (and UML) do not provide serious support for Ada modularity. Most tools don't care, they just target C++ or Java, and so are mainly "class translator". -- Lionel Draghi