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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,67ca96c42837a9ca X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Getting GNAT to issue ARM error messages Date: 1999/02/14 Message-ID: <7a7aat$mse$1@plug.news.pipex.net>#1/1 X-Deja-AN: 444355699 References: <79oj1f$e8p$1@nnrp1.dejanews.com> <1999Feb10.073547.1@eisner> <7a1a9i$2kq$1@nnrp1.dejanews.com> <36C47579.3D0CAFCB@averstar.com> <7a490k$snr$1@plug.news.pipex.net> <7a5b71$d25$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-02-14T00:00:00+00:00 List-Id: robert_dewar@my-dejanews.com wrote in message <7a5b71$d25$1@nnrp1.dejanews.com>... [...] |First of all, most *certainly* useless RM references have |the potential for harm. They can send people off on wild |goose chases trying to read (to them) incomprehensible |stuff in the RM which just adds confusion to lack of |understanding. Couldn't you just warn users in the GNAT manual not to follow RM references unless they are Ada experts? (On reflection, I think I can see the answer to this one: how many users read the manual? :-) |Once again, the GNAT philosophy is to include the RM |reference if and only if it is significantly helpful to |the majority of users. | |We do not find many such examples! This might argue for the inclusion of a compiler flag (do as GNAT now does by default, but a flag ('-smartass'?) causes references to be added). But, I'll admit, this might be considered just a tad overkill! |The argument that extra information should be supplied in |an error message even if it is only useful to a very small |number of users is dubious. It would for example equally |well justify routinely adding a Russian translation of the |message, along with a dubious RM reference. A very fair point (badly put :-)[supplying versions of an application program (and in this sense a compiler is an application program) for different (human) languages is hard work but usually a worthy exercise]. Plainly, an error message which ran on for seven pages, and included amusing anecdotes on the relevant subject plus a full horoscope, is unlikely to be what any user would want. |Once again, how about a specific example where an RM |reference would help general users. Well I (personally) have to admit to being stumped by this one, for the simple reason that I am not a GNAT user (yet)[I may become a GNAT user in the future, depending on various things]. I can only report that I myself have always appreciated those compilers which gave out references to the approriate sections in their respective manuals. However, I have to admit that this is not entirely a fair comparison, since the RM95 is not any compiler's manual (or at least shouldn't be), and I guess I am not a typical user anyway. |Nick, you are writing an Ada compiler, that means you know |the RM backwards and forwards and completely (or you don't |have a chance), so you are definitely NOT the kind of |person to whom the error messages are targetted Point accepted. Actually, since I am considering using the well-worn trick of putting all my error messages into a big text file (precisely to make it easier to supply multi-language versions by simply supplying different message files with the same compiler), it occurs to me that supplying different versions of the messages file aimed at different kinds of user could be a practical possibility. The problem with this approach, of course, is that, for most compilers, reading in a big text file every time one compiles is likely to be unacceptably slow. [OTOH I have the luxury: I'm not actually going to worry about compiler speed myself (it's not going to be a commercial program).] However, a variation of this trick might be to factor the messages out into a separate package (or hierarchy) which simply contained a list of constant string declarations. [Does GNAT already do this? I shall be downloading the GNAT sources soon, in fact.] |(indeed I |would think anyone knowing the RM that well would not in |any case need RM references :-) Still studying like crazy ;-) |Robert Dewar |Ada Core Technologis Nick