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,a00ff2b882a06fda X-Google-Attributes: gid103376,public From: John English Subject: Re: HELP: renames and enum values Date: 2000/04/14 Message-ID: <38F70201.A8A9BF3D@brighton.ac.uk>#1/1 X-Deja-AN: 611083502 Content-Transfer-Encoding: 7bit References: <38ECE0EB.4BD4A53E@mindspring.com> <38EE2019.4C91075D@Raytheon.com> <38EE494D.DDB9CE9@mindspring.com> <8cp1hd$3so$1@nnrp1.deja.com> <8cqf1i$i72$1@nnrp1.deja.com> <38F5D6F9.5B8892F2@bton.ac.uk> <8d56ti$3sd$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@bton.ac.uk X-Trace: saturn.bton.ac.uk 955711971 525 194.81.199.181 (14 Apr 2000 11:32:51 GMT) Organization: University of Brighton Mime-Version: 1.0 NNTP-Posting-Date: 14 Apr 2000 11:32:51 GMT Newsgroups: comp.lang.ada Date: 2000-04-14T11:32:51+00:00 List-Id: Robert Dewar wrote: > In article <38F5D6F9.5B8892F2@bton.ac.uk>, > John English wrote: > > function Enum_Literal return Enum_Type renames > Other_Enum_Literal; > > > > Now, that *really* confuses them, and none of them would ever > be > > able to guess it without being told! > > I have a different view of learning languages, I do not expect > my students to "guess" anything about a language, I expect them > to learn rules and apply them. > > I agree that this rule might be non-intuitive if the basic > semantics of enumeration literals has not been presented in > a clear manner. Well, this is not quite what I meant; *if* they had to guess it, they wouldn't in a million years. I don't expect my students to guess things either, and I do indeed explain it, but in my experience many students find it completely unintuitive that the literals of a type are actually functions, and it takes a bit of frowning and head-scratching before they finally write it off as "hey, it's crazy, but you gotta live with it". ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------