[Rd] Suggestion: mkString(NULL) should be NA
Tim Keitt
tkeitt at utexas.edu
Wed May 25 14:32:15 CEST 2016
On Wed, May 25, 2016 at 7:22 AM, Michael Lawrence <lawrence.michael at gene.com
> wrote:
> On Wed, May 25, 2016 at 4:23 AM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu>
> wrote:
>
I'm not disagreeing with what's been said in this thread, but I can't help
but recall that I brought up this exact issue probably 15 years ago and was
told (by Brian, I believe) "don't do that" (pass a null pointer), which was
perfectly fine. The real issue was not the behavior but that it was not
documented or consistent. I've lived by the mantra since that you can never
trust a pointer in R code. User must always check for NULL.
I just wrote my own functions mkXXX_safe that wrap the internals and check
the pointer.
THK
http://www.keittlab.org/
[[alternative HTML version deleted]]
More information about the R-devel
mailing list