4 ms·
This. My first thought was "I hope I never encounter code that uses this." It's interesting as a proof of concept, but it makes your R code difficult to unders
by mespe 6y ago
This.
My first thought was "I hope I never encounter code that uses this." It's interesting as a proof of concept, but it makes your R code difficult to understand to 99.9% of R programmers. In my opinion, that is a pretty high cost for what I would consider mostly syntactic sugar.
- mushufasa 6y agoI agree with this. That said, a lot of the use-case of R is one-off scripts, run locally on a machine by an analyst, as part of preparing a written report for non-technical stakeholders. So the code readability isn't as important. This is both a strength and weakness of R in general. The R community has many different ways to accomplish the same goals. Production systems decline to use R in large part because of the code maintenance burden across a team, versus Python's "one right way" approach.
- matmatmatmat 6y agoI wonder how true this "one right way" is? For instance, I've seen multiple ways to do the same thing in Pandas. Does it come down more to an agreement among the team about how code should be written?
- notagoodidea 6y agoI found that the "one right way" python's mantra fall apart when it comes to pandas and numpy. Those libraries must be seen as DSL on top of the language IMHO.
- mespe 6y agoEvery time I think code readability isn't important, I am inevitably proven wrong. Either I need to go back months later and need to figure out what I did, or I end up sharing with others. Even those one-off, "never going to touch this again" scripts.