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: 103376,5bcc293dc5642650 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.15.134 with SMTP id x6mr2077165pbc.0.1319788221897; Fri, 28 Oct 2011 00:50:21 -0700 (PDT) Path: p6ni10618pbn.0!nntp.google.com!news1.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Why no Ada.Wide_Directories? Date: Fri, 28 Oct 2011 09:50:03 +0200 Organization: cbb software GmbH Message-ID: <4mt5445uem00$.1qyryu5m4fn92$.dlg@40tude.net> References: <9937871.172.1318575525468.JavaMail.geo-discussion-forums@prib32> <409c81ab-bd54-493b-beb4-a0cca99ec306@p27g2000prp.googlegroups.com> <1rlz5gwqmeizn$.fwqpl0mhzf54$.dlg@40tude.net> <1w7i4ekc7yvjx$.60o908ry5lhc$.dlg@40tude.net> <5279agttaub8.1pl7pt496l1am$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18733 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2011-10-28T09:50:03+02:00 List-Id: On Thu, 27 Oct 2011 23:09:42 +0200, Yannick Duch�ne (Hibou57) wrote: > if you do not expect to use dispatching > calls, you may not need classes. No. If you don't expect to use the number 123, that does not imply that integer numbers shall not have that value. > Finally, I suppose if one want classes, > that means he/she want dispatching calls. If someone want dispatching call > on some high level custom types, that's OK; if someone wants dispatching > calls on general purpose and basic type like Boolean, that's not OK, 1. You should explain the difference. Why some types are more types than others? 2. Dispatching never happens on *a* type, it does on a *set* of types. In Ada you simply cannot have a dispatching call on a specific type. Ada is a typed language. > this cost too much, unless optimized. Nope, it does not cost anything. You are comparing costs of using something with the costs of not writing (and thus not executing) the program at all. Non-existing programs consume no resources. Again, in order to make comparison meaningful you have to consider comparable cases. For example, having a class you can put class-wide instances into a container. Without the class you have to write some variant record wrapper type with alternatives of different types and the discriminant playing the role of a tag. Now you could compare the performance of this poor man's class implementation and one of the proper class. > To know when a call is dispatching or static, does not make dispatching > calls less costly. If you want dispatching call to cost not too much, you > have to optimize these calls, Not in Ada, where specific and class-wide types are distinct. If you statically know the type you declare the object of that type. If you don't know the type, then presently for types which are not tagged, you cannot write the program at all. > Or else, what kind of classes was this all about ? Class = set of types closed upon inheritance. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de