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.8 required=5.0 tests=BAYES_00,INVALID_MSGID, SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb77,4873305131bf4d94 X-Google-Attributes: gidfdb77,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public From: Jon S Anthony Subject: Re: ADA SUCKS, C/C++/JAVA RULES!!!! Date: 1997/11/11 Message-ID: #1/1 X-Deja-AN: 288747999 Distribution: world References: <34557f2b.1934172@news.mindspring.com> <36984222@NEWS.SAIC.COM> <345A83CA.CD776C91@flash.net> <63fl3r$d5c$1@news.luth.se> <345B7A48.F32E4924@flash.net> <63usl7$hqo$7@route1.mdrf.france3.fr> <647jig$igl17@beaker.nit.gwu.edu> <64albp$lhi17@beaker.nit.gwu.edu> Organization: PSINet Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.java.advocacy Date: 1997-11-11T00:00:00+00:00 List-Id: ckann@seas.gwu.edu (Charles W. Kann) writes: > : :> I have never been able to figure out a way to write general purpose > : :> programs which use an interface like construct. > : : > : :Such as? By far the most common use of MI is as a kludge to implement > : :mixin behavior. You get this cleanly and simply in Ada95 with SI and > : :generic mixins. > > When I posted this, I was talking about "interface". Look it up in Java. Yeah, I already know about Java interfaces. > It isn't "mixins". It is clean, dynamic, straight forward, and very > easy to understand. "interface" was one of the best ideas in Java. OK, yeah, that sounds about right. > The most common thing Ada people tell me is to look at Generics. I > know Generics, and it has nothing to do with the concept of an > "interface". It is: 1 - static, and 2 - backwards. I think the real issue here is clarity. You may have been intending to talk about "interface" as in Java interface, but you didn't communicate that. At least not well enough for me to catch what you meant to say. > If there is an easy way to create the equivalent of an "interface" in > Ada, I would love to see it. It can be done (if you are careful) in C++, > or any language with Virtual functions, Abstract classes, AND multiple Well yes you can. It seems odd that you would even suggest that you "can't". Is it _clean_? Well, IMO not particularly. For some reasonable details see Tucker Taft's _Programming the Internet in Ada 95_: http://www.inmet.com/~stt/adajava_paper/ This mapping technique is how one Ada=>Java implementation handles Java interfaces - going in both directions. The idiom is simplified for the AdaJava user via a new interface (Ada sense) convention: Java_Interface. This let's the compiler do some of the rubbish you'd have to do by hand if just using the idiom in out of the box Ada95. > inheritence. I am not putting down Ada, but it isn't the answer to > every problem, and regardless of what some Ada advocates might say, I have no problem putting Ada "down". I've done it many times. Just be _clear_ about what the actual technical issues are _and_ make a decent argument for it. Don't just assert it. Well, you can do that to, just don't be surprised if no one pays much attention. /Jon -- Jon Anthony Synquiry Technologies, Ltd., Belmont, MA 02178, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari