[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [cti-cybox] Email Object
Jordan, Bret wrote this message on Thu, Sep 15, 2016 at 14:45 +0000: > For the record, I really dislike it when a property can be one of two types depending on the value of some other property. For example, we have the following two properties: > > "is_multipart" boolean > "body" string or list of type mime-part-type > > So if "is_multipart" is false then "body" is a [string] however, if "is_multipart" is true then "body" is a [list of type mime-part-type]. > > It seems like a much simpler way of doing this is to have two properties for the body... > > 1) body > 2) body_multipart > > If you still want the boolean property of is_multipart, that is fine. But lets not overload properties based on the value of another property. PLEASE... I agree that these should be split. Overloading types will complicate patterning. How do we handle a pattern when the type mismatches? Such as the following when body is text? email-message:body[1].file-name = 'foobar.txt' -- John-Mark
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]