[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comments on draft-ietf-sming-reqs-02.txt: Discriminated Unions vs. Real Unions




>>>>> Durham, David writes:

>>  51: At first glance, it is somewhat confusing that discriminated
>> unions are required while unions are just nice to have.

[...]

Dave> Do you interpret a discriminated union as being able to change
Dave> the underlying base type of an attribute? It was suggested that
Dave> a "real" union (in C for example) can change the type as well as
Dave> the semantic interpretation of an attribute (perhaps even a
Dave> group of attributes). It was mentioned that supporting a real
Dave> union will require that the SMIng adds ANY to the supported base
Dave> types (which is not currently supported by SMIv2 or SPPI). I
Dave> believe that is why there are two different proposed
Dave> requirements.  One for discriminated unions (based on a semantic
Dave> selector for a statically typed attribute or group of
Dave> attributes) vs. real union which may also include a base-type
Dave> selector.

Now I am really confused.

A discriminated union is a union with an explicit discriminating
object. For examples, see RFC 1832 section 3.15 (XDR). A similar thing
exists in CORBA IDL.

I do not understand nor do I agree with your distinction above where
the "arms" of a discriminated union may not change the base type while
this is allowed for unions. I believe we must be able to express
unions of different base types as the lack of being able to do this
makes DISMAN MIBs much more complex than needed. 

I am also having problems to understand why we need to introduce ANY
to the supported base types in order to address the requirement.

Anyway, getting back to the original comment #51: I think that I can
live with the current clasification of discriminated unions versus
unions. I disagree however with changing the descriptions so that the
issues suddenly mean something else.

/js

-- 
Juergen Schoenwaelder      Technical University Braunschweig
<schoenw@ibr.cs.tu-bs.de>  Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289    Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax:   +49 531 391 5936    <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>