Hacker News new | ask | show | jobs
by saosebastiao 3717 days ago
Do any of the popular message serialization formats have first class support for algebraic data types? It seems like every one I've researched has to be hacked in some way to provide for sum types.
2 comments

Protocol buffers support oneof, which is a union type. https://developers.google.com/protocol-buffers/docs/proto#on...

(Insert joke here about Google engineers just copying around protobufs.)

Nearly the same question was recently asked in r/haskell:

https://www.reddit.com/r/haskell/comments/4fhuw3/json_for_ad...