With 'go/types' and the like, one can relatively easily automatically generate the (de)serialization code.
See: - go-hep.org/x/hep/brio IIRC, specialization is off the table at the moment. -s -------- Original Message -------- On Jan 12, 2021, 21:14, Keith Wipf < keithwi...@gmail.com> wrote: If you've ever worked with Rust, you've probably sceen the serde framework. My question is, once Go has generics, would it be possible to write something like this in Go? This seems like something that could really benefit the language. The only drawback I can see so far as that you'd have to manually write serialize and deserialize functions for your types, but that seems a fair trade off for getting good performance without using a code generator. Also, will Go generics support specialization? I thought that I saw somewhere that you would be able to switch on a type parameter at compile time. I'm thinking you'd need this to serialize ints and other primitive types because you can't implement any serialize functions on those without making a new type. Thanks -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAJRCDozXFVfTUOfEeC1tE9xrdB4KQEzAXpfHgOGA26wFPq6jjQ%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/p_mwS4Fi6zlWxfIfckAcC18HodAJkPJcVITj4y-d4Ee2KvhQUoo5cB80_aFz8NcQ3Fkkii6Y8RvM3Ja7qciUTglt8Hp0NzzBRFBhhQsfB6o%3D%40sbinet.org.