Skip to content

Use internally-tagged variant? #8

Description

@jD91mZM2

Currently packets look like

[7, [["data", "goes", "here"]]]

. Should we change MsgPack to look like

["login", "data", "goes", "here"]

?

Pros:

  • Order of enum variants doesn't matter. Clients won't break every time I add a variant.
  • Easier to get right and more difficult to get wrong.

Cons:

  • Larger in size.
  • Possibly more difficult to decode in strongly typed languages that aren't Rust.

Will this completely break any existing library?
Not as I'm aware. synacrb and goSynac can supposedly both be changed to the other format without too much pain.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions