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

Re: terminology challenge




>>>>> Andy Bierman writes:

Andy> This is implicit, and doesn't happen that often.  The
Andy> 'implements' clause is extra work for the writer and reader, as
Andy> is the entire protocol mapping macro.  Objects like RowStatus
Andy> can simply be ignored by the COPS-PR mapping.

Yes. Since we agreed to optimize for SNMP rather than being balanced
between SNMP and COPS-PR, we can simplify several things.

Andy> The only OO feature we are choosing to support can also be
Andy> achieved in C-like syntax:

Andy> TYPEDEF STRUCT FooPlus {
Andy>    DESRCIPTION 
Andy>        "Example of a subclass of Foo."
Andy> 
Andy>    STRUCT foo {
Andy>        SYNTAX Foo
Andy>        STATUS current
Andy>        DESCRIPTION
Andy>            "Base class Foo."
Andy>    } ::= 1
Andy> 
Andy>    -- add more <object-decl> clauses here...
Andy> 
Andy> }

Containment is not exactly the same as inheritance. And this does not
really look C-like either. ;-)

Andy> My point is, why do we want to use C++ terminology, when we need
Andy> C functionality?  Classes derived from other classes provides
Andy> "STRUCT in STRUCT", just 1 of the many data modelling constructs
Andy> we actually need.

Inheritance is about extending a "struct" which is not the same as
embedding a "struct". Sure, you can try to emulate some of this in C
by either embedding structs (which means the inheritance hierarchy is
visible in all places where you use it) or by overlaying suitable
aligned structs and doing pointer casts (something which probably does
not work or would be pretty ugly in the case of the SMI).

/js