From: Kevin M. <ke...@vr...> - 2002-05-30 21:43:29
|
> > And I'm suggesting that we don't make that requirement. I'm saying that > anything that's manipulating a property on an object should be set/get. good idea for usability, bad idea for maintainance/implementation. that is why we chose not to do it that way, because we'd be maintaining all these duplicate make and get functions... :( it also keeps all function template stuff in the make functions. keeps the interface consistant. the only solution to what you're wanting (i think) is to kill off all the make functions, and rename them to get... Do we want that? > ie. > > Matrix4ff mat; > Vec3f v; > setTrans(mat, v); > v = getTrans(mat); > getTrans(mat, v); > > I would prefer using "get" to having to use "make" for the middle > function since this is a common idiom that I and I hope (could be wrong > though) most OO programmers are familiar with. I guess I don't see why we > should create our own idiom just because we happen to be doing OO in C > rather than C++. To me, the language doesn't matter when it comes to > naming. > > > > > since you wanted it out the back as temporary, then it is make. I can't > > remember what the original issue is anymore. Does this clear it up? > > I understand how GMTL is currently implemented. Completely clear on that! > I realize that currently if i want something out the back of a function I > have to use a "make" function. My issue is that I don't feel that this is > a good naming convention for the reasons listed before and am trying to > show you guys as to why. so you want get/set, with no make funcs? is there a good time at all to name something make? > All I seem to get back from you is a description > of how it is currently implemented and that I should use that. Perhaps you > could give me a reason as to why it should be implemented that way. i have. it is constructor based. this is why it is implemented that way. make is the name we chose to represent a copy constructor. I've said it many times. you (i think) are proposing to call the copy constructor "get"... > > > > > just write a set( vec, mat ) and a set (mat, vec), and you'll be golden. > > if you need a constructor, use "make"... > > > > The only way to have constructors in C, or the only way to decouple > > constructors from C++ objects is to have "make" functions. Is it the > > naming you don't like? I don't see the problem I guess... > > We're not really doing C. We're doing C++ and we DO have constructors. In > no way does a "make" function decouple the constructor from the object. it does IMHO... we've decoupled constructors, and that is the philosophy behind the make functions. > > > > > kevin > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > ggt-devel mailing list > > ggt...@li... > > https://lists.sourceforge.net/lists/listinfo/ggt-devel > > > > cheers, > ----- > Ben Scott > Research Assistant VRAC > bs...@ia... > -- *--*---*---*----*-----*------*------*-----*----*---*---*--* Kevin Meinert /_/ http://www.vrac.iastate.edu/~kevn \ / Virtual Reality Applications Center \/ __ \/ Howe Hall, Iowa State University, Ames Iowa \__ \_\ |