comp.lang.ada
 help / color / mirror / Atom feed
From: je@bton.ac.uk (John English)
Subject: Re: private and limited private
Date: 1996/10/15
Date: 1996-10-15T00:00:00+00:00	[thread overview]
Message-ID: <53vmmb$560@saturn.brighton.ac.uk> (raw)
In-Reply-To: Dz3G8o.pEo@imagin.net


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    |
---------------------------------------------------------------




  reply	other threads:[~1996-10-15  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-08  0:00 private and limited private AGBOH CHARLES
1996-10-10  0:00 ` Matthew Heaney
1996-10-10  0:00 ` David Kirkland
1996-10-11  0:00 ` Samuel Mize
1996-10-15  0:00   ` John English [this message]
1996-10-15  0:00     ` Pat Rogers
1996-10-17  0:00     ` Samuel Mize
1996-10-21  0:00       ` John English
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox