From: Ted Dennison<dennison@telepath.com>
Subject: Re: Small question concerning use
Date: Tue, 16 Oct 2001 20:35:46 GMT
Date: 2001-10-16T20:35:46+00:00 [thread overview]
Message-ID: <CS0z7.31806$ev2.38922@www.newsranger.com> (raw)
In-Reply-To: 3BCC8AF0.A8B1115D@san.rr.com
In article <3BCC8AF0.A8B1115D@san.rr.com>, Darren New says...
>
> Ada.Strings.Unbounded.To_Unbounded_String(J)
> Ada.String.Unbounded."&"
> Ada.Strings.Unbounded.To_Unbounded_String(K);
>
>I don't see that as at all readable. I'm not sure quite what would be
>better, tho. I'm just a newbie. :-)
Ahhh. Well, I *do* think "use type" is perfectly fine, even for newbies. (Are
there folks who don't? I keep hearing that there are.) So I'd expect this code
to look more like:
Ada.Strings.Unbounded.To_Unbounded_String (J) & K;
-- The second conversion was unnessecary, as there are "&"
-- functions that take String as one of the parameters.
That looks quite a bit better, and its still clear from reading this exactly
what type will result and where I can go to look it up. Sure, it would have been
nice if you didn't have to type "Unbounded" and "String" twice, but most
*decent* package designers won't do that to you. ;-)
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
No trees were killed in the sending of this message.
However a large number of electrons were terribly inconvenienced.
next prev parent reply other threads:[~2001-10-16 20:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-15 22:28 Small question concerning use Eric Merritt
2001-10-16 6:34 ` Rename is much better Petter Fryklund
2001-10-16 12:28 ` Small question concerning use Marc A. Criley
2001-10-16 13:27 ` Ted Dennison
2001-10-16 19:31 ` Darren New
2001-10-16 20:26 ` Ted Dennison
2001-10-16 21:26 ` David Starner
2001-10-17 0:18 ` tmoran
2001-10-17 2:48 ` Darren New
2001-10-17 10:52 ` Larry Kilgallen
2001-10-17 13:48 ` Ted Dennison
2001-10-17 14:21 ` Ted Dennison
2001-10-16 20:35 ` Ted Dennison [this message]
2001-10-16 13:54 ` Marin David Condic
2001-10-18 18:46 ` Dr. Michael Paus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox