3 ms·
It is unusual to see R in a list of languages characterized as being developer unfriendly, at least in this century. Best in breed metaprogramming and code intr
by notafraudster 8y ago
It is unusual to see R in a list of languages characterized as being developer unfriendly, at least in this century. Best in breed metaprogramming and code introspection tools, an excellent debugger and profiler, a wide ecosystem of accessible books written by core language developers, an excellent (although I agree difficult to submit to) central package repository, high quality data serialization options, built-in report-making tools, huge and high quality standard library (even moreso if you consider the tidyverse a standard library), easy to use and efficient ways to dispatch to other languages, etc.
There are a bunch of weird language quirks, most stemming from its legacy as a reimplementation of S in the early days, but I would be surprised if it was viewed as developer-unfriendly.
- ams6110 8y agoI'm a developer of 20+ years and I found R to be unfathomable. By that I mean so arbitrary and inconsistent that I quickly gave up on thinking it was worth my time.
- YeGoblynQueenne 8y agoI use R all the time, and I have come to love it, but I feel it's Stockholm syndrome. There are many complaints about it, by others, more experienced at the langauge than me (and some who are less so) that you can find on the internet. My personal beef is with the inconsistencies in the syntax, programming conventions and, particularly, data structures, all of which were designed in a haphazard manner over many years, by many different parties working without any coherent plan towards integration and unification of language features. Like you say, it's basically a more "modern" layer bolted on top of S- or rather, many, many such layers, some distinctly less modern than others. The result is that it's very difficult to figure out the language as a whole. For every specific thing you want to do, very often, there's a very special way to do it, and you just have to know it, you can't just intuit it from first principles, like in other languages. A couple of months ago, a medical student who wanted to get into data science asked me which language to use, R or Python. I recommended Python, although I myself prefer to work in R. I felt that it would be way easier for him to get started and get a feel for the job in Python, whereas in R he'd have to constantly battle the language and spend much too many hours browsing SO for tips on how to do very specific things, rather than gaining an understanding of the language as a whole- because it's almost impossible to understand R as a coherent whole; because it's not a coherent whole. So I'm not, like anti-R or anything, quite the contrary. But I do believe it's not developer friendly, not by a long shot.
- notafraudster 8y agoFollowing up after the thread has moved on -- but I think if you spend some time in the "tidyverse" and read the Advanced R / R4DS books, you'll find that the tidyverse extends the language's core competencies in a way that fixes a lot of the inconsistencies, and it is possible for people to basically never have to interact with base R if they don't want to. We train our incoming PhDs in R focused on the tidyverse and they generally get the hang of it pretty quickly. The problem you're highlighting was pretty bad 5-8 years ago where core R developers were pushing three different object models. These days pretty much everyone has agreed to use S3. The bigger challenge in data science is that statisticians are generally shitty programmers and so many of the packages are very much v0.1 releases designed to accompany a journal article and never iterated on. The reverse tends to be true in Python -- the notorious thing with scikit-learn defaulting to penalized logistic regression last I checked is insane. If none of this is news to you, then agree to sort-of disagree for sure, but if you haven't checked out R4DS or spent much time with modern packages you'll see that you can pretty safely leave behind a lot of the stuff you used to hate. I re-wrote the analysis for a paper I wrote I think 4 years ago, and I was surprised at how little code didn't change in that time.
- deleted 8y ago[deleted]
- YeGoblynQueenne 8y agoWell, my complaint is that you need something like the tidyverse and a ton of books and blog posts -and Stack Overflow threads- to figure out how to do basic things with R. When I first started learning R, my first point of call would be the CRAN package documentation, which was, often, indecipherable (e.g. it often refers to concepts in S). What I mean is, it takes a lot of support before you can feel comfortable and be fluent in R, rather more so than in the languages used in the software dev industry, that are much more considerate of programmers' strengths, and, of course, weaknesses. I'll agree to sort-of disagree. Thanks for your insights and merry christmas :)