Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #27253

Closed
Open
Created Aug 22, 2018 by dmr@dmr

Decide: rename Size subclasses to indicate unsigned and bit counts

I wanted to make sure this got specifically addressed before a stem.client release, since after that point it might be too late (due to backwards-compatibility concerns).

From [[ticket:26227#comment:4]]:

==== Naming: stem.client.datatype.Size subclasses/attributes Suggestion: It might be good to switch CHAR/SHORT/etc. to UCHAR/USHORT/etc. I don't know what the convention is here, but it may help for readability.

I'm personally used to U<size> to signify unsigned and <size> to signify signed. I think switching to U<size> would make the code //potentially// easier to read for newcomers from various backgrounds.

Suggestion: Similarly, it may help to put the bits length in it, too - for the most immediate readability. So, e.g.:

  • UCHAR8
  • USHORT16
  • etc.

For reference, on a quick glance...

  • [[https://gitweb.torproject.org/trunnel.git/tree/README|trunnel]] [to use] u8, u16, etc.
  • tor [to use] uint8_t, uint16_t, etc.

atagar: thoughts?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking