Re: ADT for restricted set of values

2005-11-03 Thread Graham Fawcett
Ben Finney wrote: > Howdy all, > > I'd like to have an Abstract Data Type for a scalar value that is > restricted to a small set of values. Like an Enum, I suppose. > > What I would like is to be able to use simple 'str' values in most of > the code, but where the values are actually used in a sema

ADT for restricted set of values

2005-11-03 Thread Ben Finney
Howdy all, I'd like to have an Abstract Data Type for a scalar value that is restricted to a small set of values. Like an Enum, I suppose. What I would like is to be able to use simple 'str' values in most of the code, but where the values are actually used in a semantically meaningful context, h