News for hackers. Stuff that matters.
Re:gRPC-Web is going GA by superfrank on Wednesday October 24, 2018 @06:08PM (#18296902)
Can you give me an example where generics would be helpful? I'm not doubting you, my brain is just a little slow today and I'm struggling to think of a scenario where I feel I would NEED them for gRPC.
Re:gRPC-Web is going GA by deathanatos on Wednesday October 24, 2018 @06:41PM (#18297091)
Option<T>.

Protobuf "supports" this particular case via other means: messages are always implicitly nullable, and the WKTs cover primitives, which don't count as messages.

Map<K, V>: Protobuf has dedicated syntax for this case.

Re:gRPC-Web is going GA by calebh on Wednesday October 24, 2018 @06:55PM (#18297182)
Generics and user defined types make it easier to represent more complicated data. Now everyone is just going to have to write custom encoders and decoders to get the data to a Protobuf compatible format, which is pretty much what we do right now with JSON.

If you haven't used algebraic/sum types before, I highly recommend trying them out. Once you use them you won't want to go back.

Re:gRPC-Web is going GA by wbl on Wednesday October 24, 2018 @06:17PM (#18296950)
If I was to design a type system I would introduce sum and product as type constructors and some basic types and be done. To make this really work takes polymorphism so you can write list.