MessageHeader action

Tony van der Hoff tony at vanderhoff.org
Sat Oct 10 21:27:19 BST 2009


Jan-Jaap van der Geer wrote:
> Ralph Corderoy <ralph at inputplus.co.uk> wrote:
> 
>>>    Message_Prequit       = .Bits: 8,
>>>    Message_PreQuit       = .Bits: 8,  // V6.21 TV
> 
>>> Any reason why action is defined just as a "bits" and not its
>>> own specialised (enum) type like most other things?
> 
>> Is it because enums in this language can't have two things with
>> the same value?  (I know you can in C.)
> 
> I think the above is just a correction of an old error where the
> old value is kept for compatibility. As I think this stuff has
> been there from the beginning, I'd be very surpised if they'd
> sacrificed type-safety for the sake of compatibility with the older
> version. It would have been easier to leave it.
> 
Yes, I'm TV, and no, I didn't change the data type when I did that. You 
should find the details in the changelog.

> However, thinking about it, if there would be a definition in
> another .swi file (not that unnatural for a message type) it would
> be difficult to generate an enum-type from it since the definition
> would be split in several .h (or whatever) files.
> 
I can't remember the detail, but, yes, that sounds about right.

> Maybe it is actually better as it is.
> 
It is unusual for the status quo not to be so :)


-- 
Tony van der Hoff  | mailto:tony at vanderhoff.org
Ariege, France     |



More information about the oslib-user mailing list