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,604e0f87aa06eab6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-25 23:48:40 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: amir@iae.nsk.su (Amir Yantimirov) Newsgroups: comp.lang.ada Subject: Re: Imitation is the sincerest form of flattery Date: 25 Mar 2003 23:48:40 -0800 Organization: http://groups.google.com/ Message-ID: <5115eb96.0303252348.5af58c61@posting.google.com> References: <4dkea.75440$gi1.38045@nwrdny02.gnilink.net> <5115eb96.0303220201.44527637@posting.google.com> <5115eb96.0303232053.2fcc7d78@posting.google.com> <5115eb96.0303242148.57027600@posting.google.com> <6Y_fa.5102$kU.534@nwrdny01.gnilink.net> NNTP-Posting-Host: 81.1.215.198 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1048664920 28348 127.0.0.1 (26 Mar 2003 07:48:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 26 Mar 2003 07:48:40 GMT Xref: archiver1.google.com comp.lang.ada:35711 Date: 2003-03-26T07:48:40+00:00 List-Id: Robert A Duff wrote in message news:... > "Frank J. Lhota" writes: > > > If there is a way to get the effect of tagged scalar types without a big hit > > on efficiency, however, it would certainly be helpful. > So the question is whether a language can provide extensible scalars > with dispatching calls without slowing code that doesn't need that > power. I think the answer is yes: don't store the tag with every > object. Instead, gin it up when calling a class-wide operation. > So "+" on normal (non-class-wide) integers can be a single machine > instruction, and integers can be stored as a single word. The compiler > can determine when to gin up a tag -- no need for explicit boxing > operations. > > - Bob Exactly. Only in my C++ head it is sounds as "address of particular interface dispatch routine" instead of "tag". :) http://www174.pair.com/yamir/programming/interfaces.htm Amir Yantimirov