From: "Chad R. Meiners" <crmeiners@hotmail.com>
Subject: Re: Array Of Constant Strings?
Date: Wed, 16 Apr 2003 12:35:01 -0400
Date: 2003-04-16T12:35:01-04:00 [thread overview]
Message-ID: <b7k105$24v7$1@msunews.cl.msu.edu> (raw)
In-Reply-To: 1ec946d1.0304151817.7182ecd8@posting.google.com
"Matthew Heaney" <mheaney@on2.com> wrote in message
news:1ec946d1.0304151817.7182ecd8@posting.google.com...
> Georg Bauhaus <sb463ba@d2-hrz.uni-duisburg.de> wrote in message
news:<b7h7i3$op4$1@a1-hrz.uni-duisburg.de>...
> >
> > Will you collect a few impressions students have of the
> > readability of Ada programs? (As this might add more substance to
> > the argument that Ada syntax has advantages.)
>
> Well, here's one case where the C syntax is much simpler. In order to
> declare an array of strings in C, all I have to do is:
> Tucker showed this on CLA once:
>
> SA : constant String_Array :=
> (new String'("now"),
> new String'("is"),
> new String'("the"),
> new String'("time"));
>
> Since all the string literals have static values, then no heap is
> really allocated. But this is really a compiler optimization -- I
> don't know whether you can really depend on it.
Do you make it standard practice to second guess the compiler? As I
recalled to do so is usually a bad idea. If it makes so much of a
differencem, test your given compiler and complain to the vendor if it
doesn't perform such an optimization.
next prev parent reply other threads:[~2003-04-16 16:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-14 2:58 Array Of Constant Strings? Dr Nancy's Sweetie
2003-02-14 4:28 ` tmoran
2003-02-14 7:28 ` Dale Stanbrough
2003-02-14 7:47 ` tmoran
2003-02-14 10:06 ` Dale Stanbrough
[not found] ` <19guh-2f4.ln1@beastie.ix.netcom.com>
2003-02-14 19:41 ` Jeffrey Carter
2003-02-14 20:38 ` tmoran
[not found] ` <e0q0i-n14.ln1@beastie.ix.netcom.com>
2003-02-15 22:28 ` Jeffrey Carter
2003-02-22 19:31 ` Robert A Duff
2003-04-14 18:43 ` Dr Nancy's Sweetie
2003-04-15 11:36 ` Georg Bauhaus
2003-04-15 13:40 ` Dr Nancy's Sweetie
2003-04-15 15:13 ` Georg Bauhaus
2003-04-16 2:17 ` Matthew Heaney
2003-04-16 16:35 ` Chad R. Meiners [this message]
2003-04-16 21:03 ` Georg Bauhaus
2003-04-17 17:53 ` Robert A Duff
2003-04-17 20:34 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox