Repository navigation
avoid structure() - #2227
avoid structure()#2227
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2227 +/- ##
=======================================
Coverage 99.65% 99.65%
=======================================
Files 114 114
Lines 5173 5175 +2
=======================================
+ Hits 5155 5157 +2
Misses 18 18
|
|
This feels very subjective. For what it’s worth, I find the immutable logic using I don’t object to providing the lint (after all, many lints are subjective and they are configurable) but I am surprised that this one is being made part of the default list of undesirable functions, since it does not share the objectively objectionable characteristics of the other functions in that list (such as causing global side effects) — instead, it is an entirely subjective preference as far as I can tell. (And regarding the huge performance difference, this feels worth filing a bug report to https://bugs.r-project.org/ — the difference should not be that big, or exist at all.) |
structure()is IME always slower (admittedly on very small absolute scale) than the alternatives, with little tradeoff of readability (if anything I think using setters is more canonical -> more readable). E.g.