Idiomatic ordering with lazyeval


#1

For instance, which of these is the preferred way to check if a value is NULL using NSE (non-standard evaluation):

library(lazyeval)

my_f <- f_capture(my_var)  # let's say my_var comes from another function

# This way?
if (is.null(f_eval(my_f))) {
  # Do something
}

# Or this way?
if (f_eval(~ is.null(uq(my_f)))) {
  # Do something else
}

Am I correct in thinking that these two versions are equivalent in all cases? Am I missing some edge cases?

If they are the same, is there a preferred way? I personally find the first version more readable, but I wanted to see if there was anything I hadn't considered.