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,c9eb1b85372010e8 X-Google-Attributes: gid103376,public From: je@bton.ac.uk (John English) Subject: Re: private and limited private Date: 1996/10/15 Message-ID: <53vmmb$560@saturn.brighton.ac.uk>#1/1 X-Deja-AN: 189527526 references: <53dfjn$1u@rc1.vub.ac.be> organization: University of Brighton newsgroups: comp.lang.ada Date: 1996-10-15T00:00:00+00:00 List-Id: Samuel Mize (smize@imagin.net) wrote: : [... snip ...] : However, you can still copy it, and use the built-in equality test. : This is generally OK. For instance, if you are representing playing : cards, the type might be a record with two fields, one for suit and : one for value. It makes sense to be able to copy a card value (e.g., : for the program to remember what card was previously dealt), and to : compare two values to see if they refer to the same card. Actually, playing cards would be better represented by a limited type with a Move (as opposed to a Copy) primitive, since in the real world you move cards from A to B, you don't *copy* them. If you allow assignment, you allow the creation of as many copies of the Ace of Spades (or whatever) that you like. From watching Westerns, I gather that most people frown on this and fill you with lead/break tables over your head/whatever if you're caught doing it. --------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | fax: (+44) 1273 642405 University of Brighton | ---------------------------------------------------------------