<br><br><div class="gmail_quote">On Thu, Jan 28, 2010 at 9:47 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Thu, Jan 28, 2010 at 9:30 AM, Will Schroeder<br>
<div class="im"><<a href="mailto:will.schroeder@kitware.com">will.schroeder@kitware.com</a>> wrote:<br>
</div><div class="im">> Wes makes a good point. The other thing that is bothering me about<br>
><br>
> vtkSmartPointer<vtkClass> myLocal(true);<br>
><br>
> is that the form of this line of code, if you are not paying attention,<br>
> suggests that the class is being instantiated off of the stack rather than<br>
> heap. In general stack allocation is not allowed in VTK and I don't want<br>
> newbies getting the wrong idea.<br>
<br>
</div>I agree with Jeff that one of the main ideas here is to stop the<br>
horrid VTK_CREATE macros that show up because of peoples unwillingness<br>
to write a 2 line variable declaration throughout their code.<br>
Standardizing this will prevent the macros as well as make code more<br>
readable.<br>
<br>
I guess it depends on who you want to cater to. Wes, I imagine you<br>
don't mind the 2 line signatures because you're very accustomed to<br>
them. However, every time I show someone new to VTK some code, their<br>
first response is "geez it takes all that just to make a variable!?".<br>
I'd say it could be scaring off new users. I'd imagine most users are<br>
c++ beginners, using VTK as a tool for their trade rather than caring<br>
to be a computer scientist. Actually - are there any statistics on<br>
this? Have there ever been surveys about who is using VTK?<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div>Hey Dave,</div><div><br></div><div>I think you have it backwards.  Macros and shortcuts are great for people who already know the code.  There may be a moment of "sticker shock" when you introduce a new person to VTK, but the explicit declarations, long member function names, and many other idiosyncrasies help to minimize the amount of <i>a priori</i> knowledge a user needs and the number of files that need to be traversed to find an answer.</div>
<div><br></div><div>The long lines, while intimidating at first, are a new user's best friend a few days down the line.</div><div><br></div><div>- Wes</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">Thanks,<br>
<br>
David<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><br clear="all"><br>-- <br>Wesley D. Turner, Ph.D.<br>Kitware, Inc.<br>Technical Leader<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4920<br>