* Re: Type problem, any suggestion?
1999-09-22 0:00 ` Type problem, any suggestion? José María Álvarez Palomo
@ 1999-09-22 0:00 ` Simon Wright
0 siblings, 0 replies; 2+ messages in thread
From: Simon Wright @ 1999-09-22 0:00 UTC (permalink / raw)
=?iso-8859-1?Q?Jos=E9=20Mar=EDa=20=C1lvarez?= Palomo <alvarezp@lcc.uma.es> writes:
> This exercise had to implement a generic ADT (for example a stack) and
> to implement a procedure library to widen the ADT functinality (for
> example, a procedure to know the length of a stack).
> I think your solution it is a very smart way to do it, but I am afraid
> it will be difficult to make students understand it.
Yes, I see what you mean!
If you aren't too concerned with the details (I suppose this depends
on whether you want the students to come up with a solution on their
own!), you might say something like
there is a package gen_dat which we can instantiate for any type
(eg, integer, float, you-name-it)
there is an extension of gen_dat called dat_lib (BTW, these names
seem a little vague to me!)
if you're going to make a new dat_lib you have to refer to a proper
instantiation of gen_dat (one that uses the appropriate type)
and you need to mention the type as well in the instantiation of
dat_lib to round things off
(I think the last point could be better expressed)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Type problem, any suggestion?
[not found] ` <x7vhfksofsb.fsf@pogner.moho>
@ 1999-09-22 0:00 ` José María Álvarez Palomo
1999-09-22 0:00 ` Simon Wright
0 siblings, 1 reply; 2+ messages in thread
From: José María Álvarez Palomo @ 1999-09-22 0:00 UTC (permalink / raw)
Dear Simon,
first of all, thank you very much for your fast, kind and accurate
answer. This is the first time I posted something on a newsgroup and I
am very glad ofthe results. Three people have answered my
request and solve my problem in 24 hours.
>> It's not obvious what you were trying to do, so it's hard to offer
>> more help. However, you might try instantiating gen_dat only once;
I am an assistant professor at the University of Malaga and I am trying
to change the languaje programming in a Abstract Data Type subject from
Modula 2 to a more suitable and modern
language (the discussion now is between Ada and Java). So I am coding in
Ada the exercises proposed to the students.
This exercise had to implement a generic ADT (for example a stack) and
to implement a procedure library to widen the ADT functinality (for
example, a procedure to know the length of a stack).
I think your solution it is a very smart way to do it, but I am afraid
it will be difficult to make students understand it.
Anayway, thank you very much again
--
Jose M. Alvarez Palomo
Dpto. Lenguajes y C. Computacion. Tfno.: 34 952 132750
Complejo Politecnico. Campus de Teatinos. Fax.: 34 952 131397
E.T.S.I. Telecomunicaciones. Email: alvarezp@lcc.uma.es
Univ. de Malaga. 29071. Malaga. Spain.
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-09-22 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <37E2764A.2B0AA8C7@lcc.uma.es>
[not found] ` <x7vhfksofsb.fsf@pogner.moho>
1999-09-22 0:00 ` Type problem, any suggestion? José María Álvarez Palomo
1999-09-22 0:00 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox