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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Stephen Leake Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator Date: 1998/01/21 Message-ID: <34C625A0.2DE0@gsfc.nasa.gov>#1/1 X-Deja-AN: 318046850 Content-Transfer-Encoding: 7bit References: <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com> <34bba5a1.224459@SantaClara01.news.InterNex.Net> Mime-Version: 1.0 Reply-To: Stephen.Leake@gsfc.nasa.gov Content-Type: text/plain; charset=us-ascii Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.lang.ada Date: 1998-01-21T00:00:00+00:00 List-Id: Robert Dewar wrote: > > < to a compiler)? GNAT complains "missing operand" pointing to the second > plus, which isn't the most helpful error message I've ever seen. > Rational's compiler complains about a missing expression before the > second plus, which is no better. > >> > > [This was for the illegal use of unary plus and minus as in > > x & + b > > it is always hard to know what might be the "most helpful" message, since > of course this involves telephathy. I wonder if we changed this to > "unary plus[minus] requires parenthesization in this context" > > or somesuch, would this be an overall improvement, maybe, it is a tossup. > The problem is that one or the other is correct but it is hard to tell > which. Perhaps you can just print both error messages; let the user figure it out. When there are only two choices, this isn't bad. In places where there are lots of choices, maybe you could have a "verbose error" compiler option. > > Yes, if you got fancy you could use type information to tell, but that's > reallyu *awfully* heavy in implementation complexity. -- - Stephe