Comments (1)
Oh, i just discovered #13 .
Why ban so extremely useful feature?
We are able to encode/decode enums into valid Msgpack structure and I'm sure with little effort this would be also possible in other languages.
C++ has union type or more robust boost::variant and QVariant. Duck typed languages will neither have problems. In Java there could be simple switch statement on index returning reference to Object.
Many other similar libraries like Avro or [Cap’n Proto] http://kentonv.github.io/capnproto/) also supports enums.
Msgpack has two big advantages over other serialization formats in current rust: It's schemaless (you have to just derive Encodable/Decodable) and effectient. For this reasons i'm sure it will become very popular in rust. And if enums will not be supported (althought it's so easy) there will be many forks in local projects. It would be better to support this directly here and just add some docs describing how enum support is implemented and it's not recommended to use them in cross-language projects unless they are necessary.
from rust-msgpack.
Related Issues (20)
- Add enum support. HOT 3
- Out of touch with master. HOT 4
- Build failing on serialise::Decoder trait HOT 2
- Travis builds failing since bbd93a7 HOT 1
- Doesn't compile with the latest rust HOT 1
- Fails to pack/unpack
- task '<main>' failed at 'called `Option::unwrap()` on a `None` value' HOT 5
- Structs are encoded w/ map type but are not valid msgpack maps! HOT 8
- Nullary option variants corrupt the next element in the decoder. HOT 2
- Publish to crates.io HOT 1
- Value is not Decodable after the move to associated types HOT 4
- port to rust 1.0.0 alpha
- Clone Trait
- Build is broken against nightly
- msgpack-rpc HOT 5
- Does not compile with rustc 1.7.0 HOT 3
- Won't Compile with rustc 1.15.0-nightly (8f02c429a 2016-12-15)
- It doesn't compile with byteorder v1.2.1 HOT 1
- Mark this library as deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-msgpack.