Hacker News new | ask | show | jobs
by adonig 1164 days ago
I remember when we first used R in a stochastic class. The professor (a mathematician) was in love with the language and the students (computer science) considered the language to be the PHP of science.
1 comments

as a computer scientist and programming languages nerd, I think R is a much better language than Python (comparing the two only because Python is leading in the data science field)

I also believe that the tools available are superior, RStudio is very good IMO.

I wonder why R has such a bad reputation.

Because it’s built around a very specialized set of needs (data manipulation, visualization, and statistical modeling), and it is essentially best in class at it, but it has quirks as a result. Anyone coming to R from a background in another language will feel those quirks intensely and assume it’s bad.
A lot of programmers dislike R for the same reason they dislike PHP: weak typing.

If you can get over that, though, there's a lot to like about R. It's sort of like a hybrid between a Lisp and an array language.

Javascript and C also have weak typing. And Python isn't statically typed, it's just that like Ruby, it doesn't allow implicit conversion, except with numbers.
Weak typing? No, it's not. R is a strongly typed language.

> 1 + "string"

Error in 1 + "str" : non-numeric argument to binary operator

Iirc the scoping is also very strange. Certainly not as bad as mathematica, but bad nonetheless.