John Lam (DLR)
jflam at microsoft.com
Tue Nov 13 14:48:31 EST 2007
Peter Bacon Darwin:
> Is there any rule for when you should put DynamicSite instances into
> Ruby.Builtins.RubySites rather than local to the class that uses them?
> As an example, Numeric has a method called coerce that is used quite a
> lot inside Numeric but occasionally used in other classes. Should the
> DynamicSite for this be inside Ruby.Builtins.Numeric or
We don't have any hard and fast rules about this. The general rule is if you believe that the site is useful across more than a single type, then it's OK to move into Builtins.Sites since your locality of reference is already pooched.
More information about the Ironruby-core