comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: About conversions
Date: Wed, 22 Nov 2000 04:54:16 GMT
Date: 2000-11-22T04:54:16+00:00	[thread overview]
Message-ID: <8vfjhn$t4e$1@nnrp1.deja.com> (raw)
In-Reply-To: 8vetq2$bkb$1@nnrp1.deja.com

In article <8vetq2$bkb$1@nnrp1.deja.com>,
  Ted Dennison <dennison@telepath.com> 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.



  parent reply	other threads:[~2000-11-22  4:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-20  0:00 About conversions Sandro Binetti
2000-11-20  0:00 ` Ken Garlington
2000-11-20  0:00   ` Robert Dewar
2000-11-20  0:00     ` Stephen Leake
2000-11-21  0:00       ` Robert Dewar
2000-11-21  0:00         ` Warren W. Gay VE3WWG
2000-11-21  0:00           ` Robert Dewar
2000-11-21  0:00             ` Ted Dennison
2000-11-22  3:27               ` Warren W. Gay VE3WWG
2000-11-22  4:54               ` Robert Dewar [this message]
2000-11-22  0:00                 ` Ted Dennison
2000-11-22  0:00                 ` Wes Groleau
2000-11-22  0:00         ` Tristan Gingold
2000-11-24  0:00         ` Jean-Pierre Rosen
2000-11-24  0:00       ` Jean-Pierre Rosen
2000-11-21  2:57     ` DuckE
2000-11-21  0:00       ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2000-11-23  6:21 Christoph Grein
2000-11-23  0:00 ` Wilhelm Spickermann
2000-11-23  0:00   ` Florian Weimer
2000-11-23  0:00     ` Wilhelm Spickermann
2000-11-28  2:20   ` Robert Dewar
2000-11-24  0:00 Christoph Grein
2000-11-28  1:33 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox