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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7eaf9f2597de2259 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-09 19:05:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!drn From: Robert*@ Newsgroups: comp.lang.ada Subject: Re: on package naming, should the word "_pkg" be part of it? Date: 9 Oct 2001 18:48:24 -0700 Organization: Newsguy News Service [http://newsguy.com] Message-ID: <9q09d801073@drn.newsguy.com> References: <9pif1o01btl@drn.newsguy.com> <3BBD12F1.9BED0B70@acm.org> <20011009174047.V16689-100000@shell5.ba.best.com> NNTP-Posting-Host: p-300.newsdawg.com X-Newsreader: Direct Read News 2.90 Xref: archiver1.google.com comp.lang.ada:14107 Date: 2001-10-09T18:48:24-07:00 List-Id: In article <20011009174047.V16689-100000@shell5.ba.best.com>, Brian says... > >The meta idea is that the type name is >completely generic, like naming tagged types "Class" (hmmm) or "Object" >(awful) and the meaningful part of the name is pushed onto the package >name. > >A nastier objection is that many modules have more than one exported type, >and not even one that can be called the "main" one. In that case you can >still use an "_T" suffix, but since those Ada programmers who prefer a >suffix have gravitated towards "_Type" I think that it makes more sense to >just use that if you are so inclined. I think all of the above is a side-effect of trying to make Ada look like the other 'normal' OO languages, in which the class is the basic and primary building block in the program, and not the package. In Ada the package is the basic building block in the program. I wish the Ada95 designers would have introduced the class construct as in Package XXX is Class Vehicle is Begin private i : integer; private name : string; function Vehicle is --- the constructor begin .... end; public function get_name returns string is ..... end get_name; end class Vehicle; Class Car extends Vehicle is Begin ..... end class Car; ... possibly other class declarations here or other type declarations. end foo; Now the above looks and feels like the other OO languages, and would have made it much easier for Ada to be attractive to the new generation of programmers who want to do nothing but OO things. I know, I know, the above would have broken backword compatibility with Ada83, and it is mainly a cosmatic change for marketing purposes, But I think it would have been better to do it the above way (similar to Delphi) and call the new langauge something else, who cares, as long as it retains all the other good things about Ada. I wish I was good in language design (you probably think I am not based on the above, right? :), but if I knew how to design languages, I would design a new language that has all the good stuff that Ada has now, but with the above change in it. I bet the new language would be more popular than Ada95 as it stands now. I am not saying the current tagged record is bad from technical point of view, I think it is technically brilliant since it introduces OO to Ada with the least amount of changes. I am saying that making Ada look like the other current OO languages in that respect only, would have made it much more popular and easier to get into it for OO programming since it would looked and felt the same as C++ and Java and Delphi etc...