Child pages
  • Coding Style and Guidelines for Contributors

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added note on identifier naming conventions

...

  • bitPosition0b - means position, measured in bits, first bit is at position 0.
  • childIndex1b - child index, first child is at index 1.

 

...

Identifier Naming Conventions

Choose identifiers for positions, lengths, and limits wisely. Here are some conventions to follow:

position/pos = A one or zero based position from the start. Java Buffer uses position in this sense (Java are always 0 based).

limit = limit position = the position one past the last valid position. Java Buffer uses limit in this sense.

offset = a relative position, commonly within a byte or word. E.g., val bitOffset0b = bitPos0b % 8.

length/len = limit - position

length limit = a length that bounds the maximum length

size = same as length.

Line Endings

All files should use Unix line endings (i.e. \n).

...