Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate varint #14

Open
roblabla opened this issue Jan 24, 2017 · 4 comments
Open

Deprecate varint #14

roblabla opened this issue Jan 24, 2017 · 4 comments

Comments

@roblabla
Copy link
Contributor

Varint is really a minecraft-specific datatype that never should have been in ProtoDef to begin with. It is under-specified, and is adding cruft. Furthermore, it created issues like #12 when it wasn't behaving as expected because of the under-specification.

I propose we remove varint.

@Saiv46
Copy link
Contributor

Saiv46 commented Dec 30, 2020

Actually, varints are also used by ProtoBuf.

@roblabla
Copy link
Contributor Author

roblabla commented Dec 30, 2020

yes, but using protodef to parse protobufs is kinda weird. I expect people using protodef to be parsing custom protocols that are unlikely to use Protocol Buffers. In practice, not many protocols use this specific kind of varint. QUIC for instance, uses a different variable integer scheme where the first two bits are used to decide on the length. See https://github.com/quicwg/base-drafts/blob/f3b76d0adce066194a43a7560284fdc1a78c4ab7/draft-ietf-quic-transport.md#variable-length-integer-encoding-integer-encoding

Because this type is neither obvious nor fundamental, I do believe it should be declared an extension instead of being part of the core specification.

EDIT: if it remains in core specification, having it renamed to pbvarint would at least give a subtle hint as to the kind of varint we're providing.

@Saiv46
Copy link
Contributor

Saiv46 commented Jan 2, 2021

@rom1504 Please create a repo like ProtoDef-Extensions, so such specific types like varint and int could be moved to

@Saiv46
Copy link
Contributor

Saiv46 commented Jan 13, 2021

@roblabla How about moving it to https://github.com/Saiv46/protodef-extensions as pbvarint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants