Saikat DebRoy wrote: > > On Monday, Oct 13, 2003, at 16:17 US/Eastern, John Chambers wrote: > > > As a heuristic, setting methods for language-related primitives is > > dangerous (also a little strange?). > > Yes. But if it is allowed, someone will do it. It may actually make > sense to come up with an appropriate (and preferably small) list of > primitive functions and say that you can not define methods for them > (at least easily).
If we're talking about r-devel, not r-patched, we can do better. The inherent problem is that a global table is used for dispatching methods for primitives. For 1.9, the plan is to replace this with more-or-less real generic functions (the less part is that the version of is.logical the evaluator calls will still be a primitive; the generic will be found by another mechanism). Once methods are dispatched from valid generic functions, then a call to is.logical within method dispatch will be unaffected by methods defined for is.logical in another namespace. As for r-patched, it would be easy to prohibit methods for those that generate infinite loops, if we knew which ones they were. John ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
