ITK provides an interesting case study w.r.t wrapping.<div><br></div><div>When the project began 11 years ago, the designers went extreme and jumped headlong into templating. While the system is very successful overall, the use of wrapping IMO has been a failure. There are a lot of reasons, but a few that stand out are </div>

<div><br></div><div>1) somebody somewhere has to decide which templates are to be instantiated, in ITK we generally choose many native types (e.g., char, short, long, float, double, etc.) and 2 and 3 dimensions. When wrapped this created massive libraries.</div>

<div>2) the wrapped classes end up having awful names reflecting their instantiation choices, e.g.  itkOtsuThresholdImageCalculatorUS3 (US3 meaning unsigned short, 3 dimensions).<br>3) the resulting "scripts" (e.g., in python) ended up being specific to an instantiation, e.g., a script would specifically handle a type and dimension (unless the script was manually unrolled to handle multiple permutations of template parameters). </div>

<div>4) Some users found templates hard to understand and use.</div><div><br></div><div>I have heard a lot of criticisms of ITK (as well as many compliments of course) but the one that sticks with me was "I like ITK except I wish it was VTK".</div>

<div><br></div><div>And very recently, the National Library of Medicine is in the middle of awarding a RFQ to create the next generation ITK v4. One of the major requests by the NLM is to create a "typeless" layer akin to VTK so that users can write applications where they don't have to worry about type and instantiations quite as much.</div>

<div><br></div><div>Will</div><div><br></div><div><br><div>On Mon, Feb 8, 2010 at 1:50 PM, Timothy M. Shead <span dir="ltr"><<a href="mailto:tshead@sandia.gov">tshead@sandia.gov</a>></span> wrote:</div><div><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Berk Geveci wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There are some other exceptions (for which we don't have a solution<br>
for wrapping). See the new array classes vtkTypedArray,<br>
vtkSparseArray, vtkDenseArray. My expectation that these classes will<br>
never be wrapped.<br>
</blockquote>
<br></div>
This may be just be me, but my hope is that we can come-up with a more-flexible wrapping mechanism to handle these sorts of special-cases.  As a real-world example, I've used Boost.Python to wrap templated container classes for other projects.<br>


<br>
Cheers,<br>
Tim<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br>
</div></div>