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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,81cf52699486abe7 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Ada95 Strengths/Weaknesses. Date: 1999/09/28 Message-ID: <7sr7ot$nq9$1@nnrp1.deja.com>#1/1 X-Deja-AN: 530239536 References: <37EED7B8.245C0054@yukyonline.co.yuky> <7smp30$9aa1@news.cis.okstate.edu> <7sp914$ago$1@nnrp1.deja.com> <7spd4c$9ic2@news.cis.okstate.edu> X-Http-Proxy: 1.0 x29.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Sep 28 20:17:46 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-09-28T00:00:00+00:00 List-Id: In article <7spd4c$9ic2@news.cis.okstate.edu>, dvdeug@x8b4e53cd. (David Starner) wrote: > This has nothing to do with what I was talking about. In C++, I > can write class BigInt, assign integers to it and pass it to templates > expecting numbers. In fact, I can sed s/int/BigInt/g and add include "bigint.h" > to the top of all the files, and the programs will run the same (provided, > of course, that BigInt follows the same semantics as int.) In Ada, I can't > write a template that expects a integer type and pass a BigInt to it. I > can't assign to it from universal integer. In Ada, BigInt can't masquarade > as a number. Why not use a private generic type, and pass in a generic package containing the operators to be used (i.e. the realization of the signature for the type), seems quite straightforward. A little more work than in the C++ case, but you get a lot for this extra work (type safety and the contract model for generics). > > Frankly, for all your scoffing at it, many people like and use MI. From > a programmer's prospective, not having MI may be a big disadvantage. As I asked before, let's see examples. > I did point this features out as experimental. I don't regard it as experimental. It is well defined, fully standardized, and fairly widely used. I just think that it is poorly designed that's all. Sent via Deja.com http://www.deja.com/ Before you buy.