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,7f2ce8bda9cae4ab X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? Date: Wed, 19 May 2004 11:59:19 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de wQcJHOrveE1TRNpd0byHuwG1dZU90qFHipI/4v/yulzvJ1mBo= X-Newsreader: Forte Agent 1.8/32.548 Xref: controlnews3.google.com comp.lang.ada:681 Date: 2004-05-19T11:59:19+02:00 List-Id: On Wed, 19 May 2004 05:20:55 +0400 (MSD), "Alexander E. Kopilovich" wrote: >Dmitry A. Kazakov wrote: > >> But to have a library you need the language first. > >You may be surprised, but I don't think so. More precisely, I don't think >that we must have a language in advance or restrict ourselves to a single >language. Of course we have to. Things like availability of class-wide programming, MI, MD, interface inheritance, supertyping etc are essential for, say, container library. This heavily influences the whole design. It is C++'s insufficient ADT which led to STL. >A library is not necessary an extension of a particular language - >this is just a viewpoint and an approach. Another viewpoint and another >approach is to build a library as a programming implementation of some >theory. To have a library with the latter viewpoint/approach we need not >the language first. We even may postpone decision about the languages that >we will use (yes, several different languages - why not?) for various parts >of our library until the design of the library will reach some level of >refinement. What we need first with this approach is solid theoretical ground >and clear and consistent requirements for implementation. In which language those requirements will be written? >> And as the story of >> container libraries shows, the languages (both C++ and Ada) seem to be >> insufficient for this job. > >The story of container libraries shows once again already known fact: Ada's >weakness for *general-purpose* libraries. I think that many Ada.* packages >suffer one way or another from this weakness. > >I guess that from viewpoint of general-purpose libraries, Ada's packages are >somehow overloaded with various features and restrictions. What is good for >specific-purpose library may be not so good for general-purpose one. It is never good. >I'm not >calling here for reconsidering of the notion of package (and not because it >is impossible, but simply because current packages are good enough for >specific-purpose libraries), but I think that there can be another (i.e., >additional) construct, more flexible and less concerned about effectiveness >(and even about readability Note that readability is the paramount concern. The whole goal of a container library to provide a higher level of abstraction. One could sacrifice efficiency, though I do not see why it is necessary, but not easiness of use. > - one may notice that general-purpose libraries >have much more chances to be supplied with additional materials then most of >specific-purpose libraries). The major problem is weakness of Ada's ADT. Unfortunately people keep on looking in wrong direction. Generics won't help. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de