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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,751d508677a5add1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambriumusenet.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: [Ada] made me hate programming Date: Thu, 1 Jul 2010 18:50:24 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <8f469661-370c-4484-82d8-f1b365455e0f@w12g2000yqj.googlegroups.com> <98aa58b3-50fc-418d-9f72-524b5a23c89d@t10g2000yqg.googlegroups.com> <4c2bd5e5$0$2366$4d3efbfe@news.sover.net> <4c2ca2d2$0$7666$9b4e6d93@newsspool1.arcor-online.net> <4c2cb60f$0$7651$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1278028225 15874 69.95.181.76 (1 Jul 2010 23:50:25 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 1 Jul 2010 23:50:25 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:12115 Date: 2010-07-01T18:50:24-05:00 List-Id: "Georg Bauhaus" wrote in message news:4c2cb60f$0$7651$9b4e6d93@newsspool1.arcor-online.net... ... > Much less so when the messages are like the ones Peter Chapin has > quoted (about overload resolution). They make me think of a > language profile that disallows overloading. > Once you have it, the confusing messages are gone, or replaced > with something that has meaning in the context of the language profile. > (Lack of overloading is arguably a desirable quality of > real world programming languages, if one includes SPARK and Eiffel. > If someone feels artificially deprived of programming powers, > you can say that once overloading is explained, we'll see some > algorithms that use it.) I don't see any particular need for such a profile, at least in the case of overloading. Janus/Ada produces error messages ignoring overloading when that is possible. For instance, if there is only one Put_String routine, the call: Put_String (10); would get the message: "Unable to resolve - parameter has wrong type" with the arrow pointing at "10". The error handler also tries to make sensible messages for predefined math operators. Thus, the reason you get unintelligible messages is that you are using heavily overloaded routines in student programs (like Text_IO). Don't do that and the problem pretty much goes away (at least until the students are taught about overloading, but hopefully by then they'll be better equiped to handle the complexity). [Unfortunately, if we can't make a sensible message, we fall back on "Unable to resolve" with no other information, which is frustrating even to someone that has been programming in Ada for 25 years [that is, me]. We could never figure out a way to present the possibilities that made any sense; AdaCore has done a better job here.] Randy.