Closed emilyodean closed 6 years ago
Thanks @emilyodean! This looks great. Thanks in particular for copying my style to make your code/docs fit in. I really appreciate it!
but at least I now understand EML a lot better!
That's great. That's also the process I went through. Feels like forever ago.
I started a review, so please see the comments there. One other thing:
new
calls to as
calls? I'm slowly converting to this practice and would appreciate it.@amoeba requested changes made!
That's awesome, thanks @emilyodean 🎉 . And thanks for the quick response to my requested changes. 🍻
That's awesome, thanks @emilyodean 🎉 . And thanks for the quick response to my requested changes. 🍻
Does R treat numbers greater than 0 as true?
In C++ you can do stuff like
if (myVector.size()) { do something }
instead of
if (myVector.size() > 0)
In the first example you get a small performance boost by cutting out the call to the >
operator.
I saw some code which may fall under that same optimization.
stopifnot(is.character(title), nchar(title) > 0)
Good point. R has the same semantics in this case, which are actually that any non-zero value is TRUE
, FALSE
otherwise. That said, I avoid the shorter syntax because the longer variant is more clear to me.
I agree -- relying on side effects like that makes code harder to understand. Ideally the compiler/interpreter should take care of any performance differences there.
@amoeba, here's the eml_project updates.
Feel free to kick this back with whatever it needs to be worthy of being in master. I have already moved on with what I need to do for SASAP specific project tasks so no worries on holding me up.
Lots of banging my head against things for very little added functionality, but at least I now understand EML a lot better!