Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: