MessageHeader action

Jan-Jaap van der Geer jjvdgeer at inbox.com
Mon Oct 12 19:23:39 BST 2009


On Sat, 2009-10-10 at 22:27 +0200, Tony van der Hoff wrote:
> 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.

Yes, that seemed the most probable :)

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

True enough :) I just wondered about the rationale behind it and if it
was an oversight, if it would be a good idea to change it. But I will
now vote against my own proposal... :)

Let's leave it as it is!

Thanks,
Jan-Jaap





More information about the oslib-user mailing list