
Network communications are critical to the tiniest embedded systems in the Internet-of-Things, through to the weightiest of relational databases anchoring traditional multi-tier applications. You might consider even creating some script generating Thrift IDL from list of types you want to support.Modern software systems live in a networked world.

You could define as many functions as you might need with all types you want to support. In Thrift you are able to use generic vector or map to define specific types, but functions need to be specific, not generic. Imagine PHP client trying to instantiate some C++ template with class defined in PHP.Īlso - please remember about security issues - passing any code to be executed on server side (template instantiation is in fact form of code execution) without verification is just a bad idea. So that's why it not usually supported to provide user with possibility to instantiate template on server side.įurther mode - Thrift was designed to support cross-platform communication. It would require some strange recompilation and reloading of parts of code during code execution.


Templates in C++ are instantiated with types at compile time, so there is no way to allow user to provide MyOwnType during runtime.
