Dave Thomas <br />Author of "<a href="http://www.amazon.com/exec/obidos/ASIN/020161622X/ref=ase_electricporkchop/002-7467239-7061602" target="_blank" rel="nofollow">The Pragmatic Programmer: From Journeyman to Master</a>
Originally posted by Dave Thomas:
If you used accessors, then you could have two of them: the old getAxisPosition that returned an int still (presumably rounding intelligently). Then you write the new interface, getAxisPositionFloat (gotta love the fact that you can't overload based on return type, eh), and you can gradulally switch your code over to using it.
Dave
Mark Herschberg, author of The Career Toolkit
https://www.thecareertoolkitbook.com/
It seems what I need to consider more when designing the class is "Why does the client need this information?" and "How will they use it?" as opposed to being so focused on actual data types.
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|