[R] Does R have a "const object"?

Hadley Wickham hadley at rice.edu
Wed Mar 16 18:57:21 CET 2011


>> Its useful for being able to set defaults for arguments that do not
>> have defaults.  That cannot break existing programs.
>
> Until the next program decides do co change those defaults and either
> can't or does and you end up with incompatible assumptions.  It also
> make the code with the added defaults inconsistent with the
> documentation though, which is not a good idea.  It may seem
> convenient but it isn't a good idea in production code that is
> intended to play well with other production code.

I like the name the ruby community has for these sort of changes:
monkey patching.  It's an evocative term!

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-help mailing list