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

Re: naming Textual Conventions




>>>>> Jeff Parker writes:

Jeff> I though this was a plea for the kind of name-space isolation
Jeff> that is used whenever people combine diverse software offerings.

Jeff> If the scope of the symbol extends outside the module, preface
Jeff> the symbol with a unique ID.

Jeff> It isn't pretty, but it is a convention that is easy to use and
Jeff> explain.

<soap>
  The SMIv2 model is that (a) module names are unique and (b) names
  within modules are unique. Thus, in order to identify something
  in a unique way, you just combine the names in order to get
  something that is safe to use in your target language, e.g.:

  SNMPv2-MIB::sysDescr
  SNMPv2-MIB.sysDescr
  snmpv2_mib_sysDescr

  So technically, the only problem to worry about is how we achieve
  uniqueness of module names.

  On the more pragmatic side, it is considered helpful if you can just
  write sysDescr (without a module name) and everybody knows what is
  meant. My understanding of the motivations behind the SMIv2 rules
  for unique names are to encourage people to create unique names.
  For whatever reason, most TCs do not have a prefix so that chances
  for "pragmatic clashes" are indeed higher (but we also have much
  fewer TCs than variable definitions).

  Personally, I have over time started to write down precise names
  (usually in the form SNMPv2-MIB::sysDescr) whenever there is a
  chance for confusion or that somebody does not know where something
  is defined since this is really not that much more work and much
  more precise. In spoken language, I still use just sysDescr - but
  then the context is clear most of the time anyway.
</soap>

/js

-- 
Juergen Schoenwaelder    <http://www.informatik.uni-osnabrueck.de/schoenw/>