Dave Rolsky wrote:
>Constants and magic values suck, names rule, d00d ;)

It's not a magic constant.  It's the index of the target observance,
relative to the current one.  I considered allowing it to take arbitrary
values (e.g., 3 to look three observances ahead), but people would misuse
that and end up iterating in O(n^2).  Hence a limited-range index.

With three differently-named methods, they'll actually end up being
implemented in terms of the single method anyway, it'll just be hidden.
I wouldn't let such a consideration alone dictate the nature of the
public API, of course.  But if we go the route of a separate heavyweight
mechanism, with a very lightweight mechanism in the classes themselves,
then there may be an advantage in keeping the interface (and unavoidable
implementation structure) as small as possible.

-zefram

Reply via email to