<div dir="ltr">Hi!<br><br>I am starting out with cl-protobufs.  I would like to interact with a service that is doing the equivalent of the following line of Python, which allows polymorphic treatement of animals, creating a cat and serializing it for transmission to a recipient expecting an Animal (the base message).<br>
<br>animal = Animal()<br>animal.type = Animal.Cat<br>cat = animal.Extensions[Cat.animal]<br># now work with cat...<br># now serialize animal ...<br><br>That example is from the tutorial at <a href="http://www.indelible.org/ink/protobuf-polymorphism/">http://www.indelible.org/ink/protobuf-polymorphism/</a> which shows the .proto file containing Animal, Cat and Dog messages.<br>
<br>How would this code look in cl-protobufs? I'd be most grateful for any clues.  I couldn't see anything like like this in the examples (but I admit I'm totally new to the protobufs concepts, and rusty at Lisp, so might have missed it...).<br>
<br>Thanks!<br><br>Thomas</div>