From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cb4682daf43a5830 X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Type problem, any suggestion? Date: 1999/09/22 Message-ID: #1/1 X-Deja-AN: 528393859 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <37E2764A.2B0AA8C7@lcc.uma.es> <37E8C094.36631D5F@lcc.uma.es> X-Trace: news.demon.co.uk 938036457 nnrp-02:12046 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada X-Complaints-To: abuse@demon.net Date: 1999-09-22T00:00:00+00:00 List-Id: =?iso-8859-1?Q?Jos=E9=20Mar=EDa=20=C1lvarez?= Palomo 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)