1 .. _coding-guidelines-yang:
3 ##########################
4 Coding Guidelines for YANG
5 ##########################
7 *Note: This document is a work in progress.*
9 - Do not use underscores ('_') in identifiers.
10 JDK 9 is on track to making underscores forbidden in identifiers, which means
11 we will need to map them and it is not going to be pleasant :-(
12 - Each declaration needs to have either a description or a reference to a
13 defintion document (like an IETF draft)
14 - Use typedefs to declare concepts. An UUID is typeless, so each instance
15 should have its scope, so we know its applicability domain.
16 'type string' should only be used to things like free-form comments and
17 similar. Please attach a 'units' statement whenever possible.