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-Thread: a07f3367d7,5bcc293dc5642650 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.204.146.17 with SMTP id f17mr91879bkv.5.1319744464249; Thu, 27 Oct 2011 12:41:04 -0700 (PDT) Path: l23ni49522bkv.0!nntp.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Why no Ada.Wide_Directories? Date: Thu, 27 Oct 2011 15:39:31 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <9937871.172.1318575525468.JavaMail.geo-discussion-forums@prib32> <7156122c-b63f-487e-ad1b-0edcc6694a7a@u10g2000prl.googlegroups.com> <409c81ab-bd54-493b-beb4-a0cca99ec306@p27g2000prp.googlegroups.com> <1rlz5gwqmeizn$.fwqpl0mhzf54$.dlg@40tude.net> <1w7i4ekc7yvjx$.60o908ry5lhc$.dlg@40tude.net> <5279agttaub8.1pl7pt496l1am$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1319744372 21294 192.74.137.71 (27 Oct 2011 19:39:32 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 27 Oct 2011 19:39:32 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:wzzAvZbtBCRQ+qOmwdyR4C5+g0c= Xref: news1.google.com comp.lang.ada:18726 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 2011-10-27T15:39:31-04:00 List-Id: "Yannick Duch�ne (Hibou57)" writes: > Le Thu, 27 Oct 2011 09:43:22 +0200, Dmitry A. Kazakov > a �crit: > >> Note that it was not about multiple inheritance. Yannick suggested that >> making types like Boolean, String, Integer etc to have classes and >> primitive operations would mean a performance loss. That is wrong. > I exactly said this would require program analysis as a whole, at the > cost of separate compilation, and thus also at the cost of dropping any > kind of library, either shared or static. If any type is potentially > the root of a class, then you have to avoid dynamic dispatching every > where possible, and to do so, you need global analysis. If you don't, > you get the direct performance issues, typical of interpreted languages. I'm not sure what whole-program analysis you're thinking of. In Ada, you can tell whether a procedure is dispatching at compile time of the declaration of that procedure. And you can tell whether a given call is dispatching at compile time of that call. No whole-program analysis needed. There would be some overhead when converting a Boolean to Boolean'Class. A Boolean should fit in 1 byte (or 1 bit if packed). So you don't want to store a Tag with every Boolean. Instead, you want to gin up the Tag on conversion to class-wide. But this overhead is not DISTRIBUTED overhead, so it doesn't matter. - Bob