Skip to content
Prev 49616 / 63421 Next

RFC: getifexists() {was [Bug 16065] "exists" ...}

For what it's worth, I think we would need a new function if the default
behavior changes.  Since we already have "get" and "mget", maybe "cget" for
"conditional get"?  "if get", "safe get", ...

I like the idea of keeping the original "not found" behavior if the
"if.not.found" arg is missing. However, it will be important to keep the
number of arguments down.  (I noticed that Martin's example lacks a "frame"
argument.)  I've heard rumors that there are plans to reduce the function
call overhead, so perhaps this matters less now.

I like Luke's idea of making exists/get/etc. .Primitives. I think that will
be necessary in order to go fast.  For my two cents, I also think
get/assign should just be synonyms for the "[[" .Primitive.  That could
actually simplify things a bit. One might add "inherits=FALSE" and
"if.not.found" arguments to the environment "[[" code, for example.

Regards,
Pete


Pete

____________________
Peter M. Haverty, Ph.D.
Genentech, Inc.
phaverty at gene.com
On Thu, Jan 8, 2015 at 11:57 AM, <luke-tierney at uiowa.edu> wrote: