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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d6ef988ec3a5ef7 X-Google-Attributes: gid103376,public From: Chris Morgan Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator Date: 1998/01/11 Message-ID: <871zyej2sg.fsf@ix.netcom.com>#1/1 X-Deja-AN: 314937703 Sender: cm@mihalis References: <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com> Organization: Linux Hackers Unlimited X-NETCOM-Date: Sun Jan 11 8:14:16 AM CST 1998 Newsgroups: comp.lang.ada Date: 1998-01-11T08:14:16-06:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: > > Terry asks > > < Interfaces.Java.Ada_To_Java_String function to the "+" > operator in the Intermetrics Java bindings? I'm > using the Aonix ObjectAda translator but assume that > the Java class library came from Intermetrics. > >> > > This is an old, old idea (the use of unary + as a reasonably un-noisy > conversion operator). Jean Ichbiah was always a fan of this idea, which > I think was firmly in mind at the time of the original Ada design. > In the Intermetrics X11 and Motif bindings there is a generic & operator which is used to approximate the variable argument list C functions in the original interface, allowing you to write stuff like this : Button1 := Xt.Intrinsic.XtVaCreateManagedWidget( "redraw", Motif.Pushb.xmPushButtonWidgetClass_obj, Form , Stdarg.Empty & Motif.xmstrdefs.XmNlabelString & label & Motif.Xmstrdefs.Xmntopattachment & Motif.Xm.Xmattach_Form & Motif.Xmstrdefs.Xmntopoffset & 2 & Motif.Xmstrdefs.Xmnleftattachment & Motif.Xm.Xmattach_Form & Motif.Xmstrdefs.Xmnleftoffset & 2 & Nulst); Whilst I'm not complaining this is elegant it reads close enough to the C that it's reasonably comprehensible to experience C/Motif programmers. Once I got the hang of it was fine. I thought Mitch did a good job with this. Chris -- Chris Morgan "I'm considering throwing myself out of the window. It wouldn't do me much damage because we're on the ground floor, but it might make for a bit of variety." - Lizzy Bryant