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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f127842852d2f03a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-21 21:00:09 PST Path: supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsxfer.interpacket.net!arclight.uoregon.edu!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: About conversions Date: Wed, 22 Nov 2000 04:54:16 GMT Organization: Deja.com - Before you buy. Message-ID: <8vfjhn$t4e$1@nnrp1.deja.com> References: <8vb0h9$1ou$1@nnrp1.deja.com> <8vbfds$dih$1@nnrp1.deja.com> <8ve71q$meh$1@nnrp1.deja.com> <3A1AB12E.8780B626@home.com> <8vept5$814$1@nnrp1.deja.com> <8vetq2$bkb$1@nnrp1.deja.com> NNTP-Posting-Host: 205.232.38.240 X-Article-Creation-Date: Wed Nov 22 04:54:16 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) X-Http-Proxy: 1.0 x71.deja.com:80 (Squid/1.1.22) for client 205.232.38.240 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:2350 Date: 2000-11-22T04:54:16+00:00 List-Id: In article <8vetq2$bkb$1@nnrp1.deja.com>, Ted Dennison wrote: > You do have a point about it being confusing to some > beginners. nope, I am just observing two things a) this construct is very rarely used for out parameters, a quick scan of a bunch of our test code showed up no uses at all in a huge chunk of code, which contained hundreds of conversions for in parameters. b) in practice it is confusing for a lot of programmers, again, that's just based on empirical evidence. This is not the first time that this point has been discussed (is anything new and interesting *ever* discussed on CLA at this stage :-) and I have seen several people who know Ada quite well get confused. (see P.S.) Why is it confusing? Simple, most people think of conversions as basically function calls, and it is peculiar to have a function call as an Lvalue. (peculiar in Ada as well, and indeed notice we do not allow conversions on the left side -- Ted's argument of symmetricality between in and out parameters applies just as well to left and right sides of assignments). P.S. Most people contributing to CLA know Ada far too well :-) I have even seen people who say that it is easy for anyone to know the value of the expression -14 mod 5 and claim the same sort of thing for people who don't know it (beginners etc ...) (and before some of you get caught out by this -- here is a little hint, if you feel like looking up the table in the RM, gyou have already failed the test :-) Sent via Deja.com http://www.deja.com/ Before you buy.