posted 17 years ago
A couple more points:
It's not like a pre-processor test if it happens at runtime, and it happens every single time the method is called. It may be similar in some ways, but the point here is to avoid unnecessary work for the processor at runtime.
Also, names like f_ptr and s_ptr look very much like they come from C or some other language. Java doesn't use the term "pointer" at all. If you're programming in Java, it will probably be less confusing to others if you try to avoid C-specific terminology. And what are f and s? First and second, maybe? You could call them something like ref1 and ref2 - "reference" is more Java-like than "pointer". I would probably not even mention that they're references, and concentrate on their roles. Maybe "leader" and "follower" - or "followerN" or "nthFollower", since the role of the latter is to follow N steps after the leader. Just some ideas...
"I'm not back." - Bill Harding, Twister