From: James F. <li...@el...> - 2009-07-11 10:30:31
|
> James Fleming wrote: > >> I must admit that I'm still confused as to why the relevant argument >> value >> is :default, as :bivalent would be more intuitive. Is there a historical >> reason for this? While I'm complaining like an ungrateful sod, would it >> be >> feasible to add :bivalent as a synonymous value here in some future >> version? > > Unfortunately the spec does not allow arbitrary arguments here: > > element-type---a type specifier for recognizable subtype of > character; or a type specifier for a finite recognizable subtype > of integer; or one of the symbols signed-byte, unsigned-byte, > or :default. The default is character. > > http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_open.html > > The only option to make this possible would be a > > (deftype bivalent () > '(or unsigned-byte character)) > > I'm not sure whether that would be an acceptable solution, > but I definitely concur with your rationale. > > Leslie That sounds like it would work nicely, actually. I'll get off my butt and actually check the spec in future, too. Sorry, I'm normally better at doing that. Cheers, James |