[MOBY-l] Boolean object

Morgan Langille mlangill at sfu.ca
Thu Mar 3 00:32:04 UTC 2005


On Wed, 2005-03-02 at 16:16, Tom Oinn wrote:
> Morgan Langille wrote:
> > I was thinking that it would be nice to have a boolean moby object. It
> > could be a sub-object of Integer (Boolean ISA Integer) that should only
> > contain 1 (true) or 0 (false). Of course there is no way to constrain
> > this but it seems useful to have this. Does anyone have any suggestions
> > on if/how a boolean object should be made?
> 
> Surely 'Boolean ISA Integer' translates to 'all operations that can 
> consume an integer can consume a boolean' which is clearly wrong, at 
> least from my perspective. You might implement a boolean as an 
> enumeration but it shouldn't look like that in the ontology. I would be 
> very surprised (as a user) if I asked what I could do with a boolean 
> operator and got multiplication as an answer...
> 
> Tom
> 

You are right. So how could I make a boolean object? Here are a couple
of ideas.

1) Boolean could be a primitive sub-object of Object, but that would
require some major changes because the current API would not recognize
Boolean as a primitive object and skip over contents of the object.

OR

2) Boolean could contain an Integer or String or both 
(Boolean ISA Object, Boolean HASA String and/or Boolean HASA Integer)
This would be a much easier solution then making a primitive Boolean
object, but is not really as correct.

Morgan



More information about the moby-l mailing list