comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: Please Help.
Date: 1997/09/15
Date: 1997-09-15T00:00:00+00:00	[thread overview]
Message-ID: <341D4041.4AF8@gsfc.nasa.gov> (raw)
In-Reply-To: dewar.874165401@merv


Robert Dewar wrote:
> 
> Stephen says
> 
> <<Unbounded strings are very nice for beginners. However, they do require
> some form of garbage collection to be used correctly. I hope that later
> in the course, this will be pointed out.
> 
> Which leads me to a question about the GNAT implementation of Unbounded
> Strings; do they have their own storage pool, and does Free compact the
> pool? One of these days I'll try to read the source.>>
> 
> When we say that something is "nice for beginners", we are presumably saying
> that students who want to write programs to do X will find it convenient to
> use feature Y. But always remember that when we teach computer science,
> writing programs as excercises is not about writing programs to do X, it is
> about learning the fundamental concepts, and techniques. The programs we write
> in class are a *means* to an end, not an end in themselves. This is a very
> improtant difference. In the world of real life application programming, the
> point is to create a working program that meets the specifications. When we
> are teaching the point is to LEARN HOW to create!

Excellent point, which I missed. It is definitely more important to
learn the fundamentals. On the other hand, if your learning control
structures, and you want to print a diagnostic message that is built
from several strings, Unbounded_Strings are nice.

 
> As to your technical question (gosh, a technical question on CLA, I had
> forgotten that this could happen :-)

Glad to oblige :)

> GNAT uses controlled types to
> implement unbounded strings. Using a special garbage collected pool is
> an interesting idea which we have thought about (and which has been discussed
> at length in previous CLA threads), but we have not yet followed up this
> idea.

As I thought. So Dale (if you're still reading :), will you be pointing
out that using Unbounded_String does have a big downside? When you get
to teaching about dynamic memory allocation and managment, you could
point out that they've been doing it all along without thinking about
it, just like a lot of professional programmers!.
-- 
- Stephe




  reply	other threads:[~1997-09-15  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-09  0:00 Please Help Ken
1997-09-09  0:00 ` Stephen Leake
1997-09-09  0:00 ` Dale Stanbrough
1997-09-11  0:00   ` Robert Dewar
1997-09-12  0:00     ` Tristan Ludowyk
1997-09-12  0:00       ` Robert Dewar
1997-09-13  0:00         ` Matthew Heaney
1997-09-13  0:00           ` Dale Stanbrough
1997-09-12  0:00       ` Dale Stanbrough
1997-09-12  0:00         ` Stephen Leake
1997-09-13  0:00           ` Robert Dewar
1997-09-15  0:00             ` Stephen Leake [this message]
1997-09-15  0:00               ` Dale Stanbrough
1997-09-16  0:00               ` Robert Dewar
1997-09-17  0:00                 ` Stephen Leake
1997-09-18  0:00                   ` Robert Dewar
1997-09-19  0:00                     ` Stephen Leake
1997-09-19  0:00                       ` Robert S. White
1997-09-20  0:00                       ` Robert Dewar
1997-09-15  0:00     ` Richard A. O'Keefe
1997-09-16  0:00       ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2001-10-25  6:55 please help Phosphorus
2001-10-25  8:22 ` Preben Randhol
2001-10-25 12:35 ` Marc A. Criley
replies disabled

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