[Smtk-developers] Crazy idea for representing View information

David Thompson david.thompson at kitware.com
Mon Sep 18 08:57:58 EDT 2017


>>> +1 ... while it does tie SMTK to using JSON in its user-facing API,
>>> it should simplify the view code.
>> 
>> One question is how this translates to the Python bindings. It seems like there are 2 paths:
>> 1. Convert view info to/from a string when crossing the C++/Python boundary.
>> 2. Bind nlohmann_json objects using pybind11.
> 
> Neither. Just convert them to dictionaries.

That's a good idea but it may not satisfy the principle of minimum astonishment; I could get a Python dict for the view info but if I modify it, the view spec would be unchanged. #1 above would behave the same way, but #2 would force them to be synchronized.

	David


More information about the Smtk-developers mailing list