Re: elements vs sets



Date view Thread view Subject view Author view

Mark Richters (mr@informatik.uni-bremen.de)
25 Feb 2000 14:36:57 +0100


Jos Warmer <J.Warmer@klasse.nl> writes: > Hello Perdita, > > At 11:05 AM 25-02-00 +0000, Perdita Stevens wrote: > >Well, you could use mySet -> asSequence -> first; but I agree that OCL is > >fundamentally broken in this respect. > > > The inclusion of a feature 'giveOneElement' for a Set (or Bag) in OCL has been > discussed in the past. We have decided not to include this, because such a > feature has undeterministic behavior. You request a random element from > the set (Bag) and you cannot determine which element you get. > Such undeterministic behavior was unwanted on OCL. Therefore it was not > included. Actually, the expression "mySet -> asSequence -> first" is undeterministic as well for sets with more than one element. Regards, Mark -- Mark Richters (mr@informatik.uni-bremen.de)


Date view Thread view Subject view Author view