It depends. R excels at backward compatibility and at interactive data analysis, which is what it's made for. But you're right in so far that you probably shouldn't use (much) R code in production.
I agree! That is what R was designed for. Puttering around
in the R shell, slicing, dicing data live, doing some interactive plot this, plot that - alas that is not how R is used anymore
... that's exactly what I use R for. At work, I use it to filter data from the FAA database of registered aircraft. Or to poke around whatever CSV data I need some specific details from that day.
I thought that was what everyone was using it for. What are people using it for?
heh, try installing a single advanced package, you'll see immediately how hundreds of libraries interdependent libraries are also loaded and compiled, each full bugs and problems
"Hundreds" is as an exageration. You make it sound as if libraries in other languages were bug free. In my experience, most libraries work well and most authors respond rather quickly to requests.
Anyway, I think it's better to make use of a small, commonly used, and well tested library instead of reinventing the wheel again and again. Libraries are not one of my concerns I have with R.
load up a bioinformatics R library in bioconductor, see what happens, a few dozen would be the low estimate. And make no mistake each does fairly complex tasks.
now what if I told you that the majority (perhaps all) of these libraries you loaded and are needed to run the complex analyses in life sciences were all developed by people who are oblivious to proper software engineering. These were never meant to be used the way they are used - expose myriad of global variable names, methods etc.
You say you are using a small well-tested library with R, sure - but that is not what happens in science and for those that see what is going on, we know we're completely FKDd
The tragedy is that we cannot cure cancer as long we try to do it with R - and R is not going anywhere ...
I get your point but there are few alternatives. Python and Julia aren't there yet. (And if they were, they would end up in the same place.) Anything else lacks the variety of packages and isn't really useful for interactive use. You must not forget, R is a tool for statisticians (and one of their presumably modern incarnations) written mostly by statisticians. Useless, error-prone packages will be weeded out sooner or later. The useful ones will improve as time goes by.
I don't know a single package that exposes global variables. I only know packages that expose certain functions and provide some configuration via options. In R, there are no really private variables though. If you want, you can access anything you want. Since everthing is packaged in its own environment, I don't see that as a problem though since the global namespace doesn't get polluted. It won't make people with a background in one of the more modern OOP languages happy but that's probably not that important.