<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 24, 2016 at 12:09 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also related to data arrays: I'd love to see the deprecation of<div>InsertValue() and <span style="font-size:12.8px">InsertTuple().  The problems with them are:</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">1) They are redundant.  As far as I'm concerned, their usage can</span></div><div><span style="font-size:12.8px">always be replaced with SetTuple() or InsertNextTuple() and the</span></div><div><span style="font-size:12.8px">resulting code will become easier to read.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">2) They don't actually "insert" tuples except at the end of the</span></div><div><span style="font-size:12.8px">array, and we have InsertNextTuple() or that purpose.  Anywhere</span></div><div><span style="font-size:12.8px">else in the array, they perform a replacement operation. </span></div><div><br></div><div>Any thoughts?  Are these methods widely used anywhere except</div><div>for VTK's own source tree?</div></div></blockquote><div><br></div><div>I have to agree. Point (2) is the dealbreaker for me -- I know I've gotten bitten by that, and I know others have been as well. The accepted meaning of 'insert' simply does not match what these methods actually do.</div><div><br></div><div>Ideally, I'd rather keep them and make them function as expected -- insert the tuple and push the tail of the array down by numComps. However, this would likely lead to nasty, nasty bugs with legacy code.</div><div><br></div><div>TBH, there's a lot of the array API that I'd love to revamp -- get rid of GetVoidPointer and WritePointer, update Insert*, GetSize/GetMaxId/GetCapacity, etc. to match modern conventions, etc -- but there's a lot of legacy code around these array classes at this point so it's tough to fix the problems.<br></div><div><br></div><div>That said, if the community can get behind such changes, I feel that they would be worth the pain. I'll go a step further and say that I'm willing to implement the changes (in VTK/ParaView) if there's enough support/funding around.</div><div><br></div><div>My $0.02,</div><div>Dave</div></div></div></div>