comp.lang.ada
 help / color / mirror / Atom feed
From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: Please Help.
Date: 1997/09/15
Date: 1997-09-15T00:00:00+00:00	[thread overview]
Message-ID: <5viibu$cbs$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: dewar.873989183@merv



[Dale Stanbrough said that 'Unbounded_String is a godsend' in teaching.]

dewar@merv.cs.nyu.edu (Robert Dewar) writes:

>I actually find such claims incredible. I would never introduce
>Unbounded_String to students till quite late in the class, since
>this kind of concentration on featurism is exactly what you do NOT
>want to teach students. Sure you introduce examples of abstractions
>to teach students, but this is a bad example, because it has too
>much complexity (particularly the reliance on controlled types).

The complexity *inside* Unbounded_String is totally invisible to students.

>To me, the idea that a student can be turned off because of a lack of
>some particular feature in a language is like saying that students
>are turned off chemistry because they have trouble with the analysis
>of one particular compound.

>Dale, are you really speaking from experience here?

In point of fact, he is.

> your own perhaps? or from experience teaching.

His experience teaching, as it happens.

An obvious point here is that 'Unbounded_String' in Ada is, practically
speaking, identical to the simplest kind of string there is in many languages
(SNOBOL, for one).
Using Unbounded_String means that students don't have to worry about

 - getting the size right (in String(1..N), what should N be?)

 - which uses of the identifier need parameters and which don't? (String
   parameters and results don't have bounds, but String local variables do;
   they all look the same with Unbounded_String)

 - partially undefined variables (if you call Get_Line, your variable is
   PARLY initialised and PARTLY uninitialised; uninitialised variables are
   tough enough for most students to deal with without having to worry about
   variables that are partly initialised and partly not)

 - how to make a string shorter (you _can't_ make a String shorter, the
   closest you can come is to carry around another variable saying how much
   of it to take seriously)

Unbounded_String would be just about ideal, *except* that you have to
introduce a lot of To_String and To_Unbounded_String conversions to deal
with older stuff like Text_IO.  Given that you have to deal with String
anyway, I think it isn't a good idea to have students worrying about two
kinds of string in the same program, and the things you have to deal with
for Strings are things you have to deal with for arrays generally, so they
are worth knowing.

>My own experience is that the one thing
>that turns on or turns off students most is the professor. A bad
>professor can make Ada a catastrophe from the students point of view,
>a good one could teach 1401 Autocoder, and the students would be happy.
>Of course students are not the ones to be able to judge curriculum
>content in any case.

Unfortunately, here students _are_ about to dictate curriculum content.
Ada has been judged 'not good on my CV, not sexy' and the department has
decided to switch to Java next year because it will be popular with the
students.  (Given that one of my ex-students, _not_ one of the world's
great programmers, is now getting TWICE what I do, writing Java for a
bank, I begin to see their point.)

>I do think that it is nice for students to be able to write interesting
>programs without too much fuss, but unbounded strings are hardly a
>prerequisite to this!

When you are trying to stave off a Java takeover, you clutch even at strings.

-- 
Unsolicited commercial E-mail to this account is prohibited; see section 76E
of the Commonwealth Crimes Act 1914 as amended by the Crimes Legislation
Amendment Act No 108 of 1989.  Maximum penalty:  10 years in gaol.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.




  parent 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 ` Dale Stanbrough
1997-09-11  0:00   ` Robert Dewar
1997-09-12  0:00     ` Tristan Ludowyk
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
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-12  0:00       ` Robert Dewar
1997-09-13  0:00         ` Matthew Heaney
1997-09-13  0:00           ` Dale Stanbrough
1997-09-15  0:00     ` Richard A. O'Keefe [this message]
1997-09-16  0:00       ` Robert Dewar
1997-09-09  0:00 ` Stephen Leake
  -- 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