Currently the SimTK API uses both "N" and "Num" in method names which return a count of something. I would like to propose that we standardize on "Num" in the next release. That is, we should have getNumBodies() rather than getNBodies().
Does anyone object? If not I propose to rename the offending routines and fix all calls within SimTK Core, but leave the old names as private methods re-implemented to call the new names the way Paul Mitiguy did when he made changes to the Rotation API. That made for easy conversion since the resulting compiler errors lead right to the replacement code.
getNWhatever() vs. getNumWhatever() in API
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
RE: getNWhatever() vs. getNumWhatever() in API
Sounds fine to me.
Peter
Peter
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
RE: getNWhatever() vs. getNumWhatever() in API
I've heard no objections, so this change is going in to SimTK 2.0. I'll try to get the new names in earlier as preferred alternates, but the old ones have to stay around for SimTK 1.6 for compatibiliy.
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
RE: getNWhatever() vs. getNumWhatever() in API
P.S. This is now a SimTK coding standard: when we need to return a count of something, we use getNumBlahs() always rather than getNBlahs(). Please tell your friends!