
A newcomer’s (angry) guide to R - striking
http://arrgh.tim-smith.us/
======
extr
HN is predisposed to hate R because everyone here is coming from a "real"
programming context. Their concerns are generally valid, but they should keep
in mind a lot of people using do not have a software development background
and do not care that the language is not elegantly designed: they just want to
get analytical work done. In that respect, R is far, far superior to Python.
Even something as simple as installing a library is a conceptual leap for
these people (why wouldn't the software just come with everything needed to
work?). Have you ever tried explaining the various python package and
environment management options to someone with a background in Excel/SQL? Just
getting a basic environment set up can be days of frustrating effort (though
Anaconda is getting better with this). Compared to R, where you install
RStudio and are off to the races, with a helpful package installation GUI.
Another great example: in R, data types are pretty fungible, everything is a
vector, coercing things generally "just works". In pandas, it can be very
confusing that you need to explicitly turn a 1x1 dataframe into a scalar
value. Same thing with Python vs R datetimes.

I understand some of this stuff is actually seen as a positive for Python in
some contexts (production usage) and I agree. Just pointing out the woke take
is the languages are both good, but good at different things. If I need to run
a quick analysis on a dataset, I'm grabbing R 9/10 times. If I'm building a
production pipeline, I'm using Python 9/10 times. This is perfectly fine.

~~~
maxander
No, you are wrong. R is _terrible_ , and especially so for non-professional
programmers, and it is _an absolute disaster_ for the applications where it
routinely gets used, namely statistics for scientific applications. The reason
is its strong tendency to fail silently (and, with RStudio, to frequently keep
going even when it does fail.) As a result, people get garbage results
_without realizing_ , and if they're unlucky, these results are similar enough
to real results that they get put somewhere important. Source: I'm a CS grad
working with biologists; I've corrected errors in the R code of PhD'd
statisticians, in "serious" contexts.

Scientific applications require things to fail _hard and often_ , to
aggressively fail whenever anything is _potentially_ behaving incorrectly. R
does the exact opposite of that in several different, pernicious ways. IMHO,
_Python_ is more dangerous than a scientific computing language should be, but
at least it will _stop when it hits an error._ R has undoubtedly cost humanity
millions of dollars in wasted research costs and caused untold confusion, from
otherwise perfectly-performed studies reporting corrupted statistical results.
The world would be a noticeably better place without it.

I simply cannot articulate my opinion about R without sounding grossly
hyperbolic. I'm sad that HN, a place which is typically enlightened in the
ways of the programming arts, is so confused what this article is on about. If
we tolerate such blatantly hostile design in something as important as the
language of scientific statistics, where do we expect to get?

~~~
zrobotics
While I kind of want to agree with you, I just don't see a better alternative.
Do you really want biochemists to have to deal with the horrors of C
compilation? In production code I'm very glad my makefile tells clang to fail
on absolutely anything, but is that the best we can do? Other commenters have
pointed out ways to avoid dangerous things like integer division, but if you
think R is hostile then please offer a tenable alternative. The only ones I
can think of are python and Matlab, and both are even worse for the intended
use.

Yes, R is not my preferred language for anything heavy-duty, but I would guess
~95% of R usage is on datasets small enough to open in excel, and that is
where the language truly shines (aside from being fairly friendly to non-
programmers).

So yes, there are some problems with R, but what are your proposed
improvements? Because if I have to analyze a .csv quickly, I'm going for R
most of the time.

~~~
ScottBurson
> I just don't see a better alternative

Julia?

~~~
jghn
The biggest Julia cheerleaders gave up years ago. That doesn't mean the
language is dead but it's not a great sign for a niche lang

~~~
int_19h
Actually, what _is_ the current status of Julia? Can anyone in the know share
a bit on the perspectives as they stand?

~~~
Sean1708
They're in the run-up to their first stable release at the moment (I think
they're aiming for August, but could be wrong about that). I can't speak for
popularity, but development is certainly going strong.

------
andrewla
As a long-time R user, I agree with all of these complaints. The language
itself is ugly and actively tries to get in your way.

I'll add that concepts like data frames are not really intrinsic, and you get
needless complexities like "length", "nrow", "dim", each of which does the
wrong thing in 90% of the scenarios of interest. The confusion of lvalues is
another strange quirk -- a <\- 0; length(a) <\- 20 is totally valid, and you
get things like class(a) <\- 'foo' being preferred over the equivalent a$class
<\- foo. It has all sorts of odd concepts between lists and data.frames -- the
double-bracket syntax, etc. The object model is very confusing, though most
people seem to have converged on the S3 system, which is the oldest one.

If you discipline yourself to learning "the good parts", especially by
learning either data.tables or tidyverse or becoming a master of
split/lapply/aggregate/ave, then it is very powerful. The modelling tools and
plotting (both base graphics and ggplot2) are excellent.

I'd love to see a NeoR arise at some point that fixes the strange historical
inconsistencies (like what happens when you refer to vec[0], as noted by the
author) in non-backward compatible ways.

~~~
curiousgal
>split/lapply/aggregate/ave

I always feel bad when I resort to a for loop in R. Do you have any
recommended ressources about mastering those specific manipulations?

~~~
crispyambulance
Really, it's not always worth the trouble.

Sometimes a loop is vastly more performant if you count the amount of time it
takes to get the "idiomatic" way working and working in a way that allows easy
troubleshooting.

------
thousandautumns
This is a stupendous example of someone going overboard on their criticisms in
order to grandstand.

R may not be the most "beautiful" language in a general perspective, but it
certainly is more beautiful than Python when it comes to actual data analysis.
There is nothing in R that is as ugly as even the best implemented pandas,
numpy, and matplotlib code. All of the options in Python, which is generally
pointed to as the "superior" language to R, feel tacked on and hackish.

The real story behind most of the complaints is that they come from software
developers who only rarely need to do data analysis that would require R, and
therefore use it infrequently and mistake their unfamiliarity with the
language with the language being bad.

I also groaned at the part where the author struggled to google questions
about R because of its "stupid name". I have literally never, ever had issues
Googling anything about R they same way I haven't ever had issues finding
answers to my questions about "Python". The author is grasping at straws, and
this is a programming blog's equivalent of clickbait.

~~~
fermienrico
R is a poor name, whether you can google it or not. The name can get lost in
the minefield of text on the internet. Just because you never had any issues
with google R does not make it any better. I have had many issues googling R
and it always makes me second guess if this thread is about R language at all.
On SO, I have to check if R is tagged.

R is a terrible name and it is not up for a debate. Whenever you name a
product, company or in this case a language as a letter "R", you're literally
asking for trouble.

Just to be fair, C is also a horrible name. On the other end of the spectrum -
Julia and Rust are excellent names for a programming language because they're
unique in the context of programming.

~~~
carlmr
>Just to be fair, C is also a horrible name. On the other end of the spectrum
- Julia and Rust are excellent names for a programming language because
they're unique in the context of programming.

Funny enough I most often get wrong results when googling something Rust
related, because there's a town called Rust (Germany), so Google pushes the
location based results up, and rust is also, well, oxidized metal, so
sometimes I get DIY pages as a result.

I love pretty much every other design decision about Rust, but it's the one
"hard" to Google language in my experience.

~~~
sametmax
Which is why we use "rustlang" and "golang" for keywords, tags, and search
terms everywhere.

Maybe they should start using Rlang. Although it's going to be annoyingly
close to erlang

~~~
dnautics
Funny story, I once worked extensively with early Julia in a scientific
setting where the hr directors name was Julia Lang, and we joked that if
someone checked packets they would think I was stalking her.

------
huac
I think many of the gotchas and annoying parts of base R are solved by using
tools from the tidyverse:
[http://github.com/tidyverse](http://github.com/tidyverse). For example, the
pain of needing to specify `stringsAsFactors=FALSE` is solved in the tibble
package by setting a sensible default.

At any rate, at least it's not Pandas and matplotlib...

~~~
_Wintermute
I can't stand the non-standard evaluation of the tidyverse. It works great for
writing one-off scripts, but as soon as you start trying to put it into
functions or your own package it's just not worth the pain of quosures and the
tidyeval nonsense that changes every 6 months.

~~~
claytonjy
I used to feel similarly, but I think it's much more stable than it was even a
year ago; `!!`, `enquo`, and `:=` is good enough for the vast majority of
users who want to write their own NSE functions now.

------
JVerstry
I learned R coming from Java, Node, PHP and Python and I love it !!! It is
awful as an application development programming language, but it was never
designed for that purpose. It was designed for STATISTICS. Try to achieve
advanced statistics with your traditional software engineer's preferred
language and see which language you hate then. The only tricky R concepts to
learn for newbies are: recycling, formulas and vectorized functions. Add
RevoScaleR to R and it kicks major ass when dealing with big data
manipulation. Oh yes, big time !!!

~~~
curiousgal
Any recommended ressources for Learning those concepts?

~~~
sdabdoub
Hadley Wickham's R for Data Science[1] is a generally good starting reference.

[1] [http://r4ds.had.co.nz/](http://r4ds.had.co.nz/)

------
digitalzombie
I use R a lot and I have to say some of these comments are weird.

1\. R and Lisp are hardly alike even if it was inspire by it. It's like saying
Erlang and Prolog is very similar. If you want learn FP do it in Erlang, Lisp,
Haskell, etc.. Don't do it in R, it's half baked.

2\. R syntax is ugly with warts. But built in datatype like dataframe, factor
type, NA (missing value notion) value, make this language much better than
many languages out there for dealing with data. Subsetting dataframe is a
breeze even in base R.

3\. There are many many advance statistical packages only in R. GLMnet was was
in R for 4-5 years before someone decided to port it to Python. You can argue
that there might be alternative package. But the statistician that created
ridge, elastic, etc... method made GLMnet. There are many statistician out
there that just implement their latest method in R. If you want to learn a
subject in statistic there is probably a book out there and it'll have an R
package and code to come along with it. Next to that will be SAS. There are
very few stat book with python packages. You want to learn bayesian statistic?
Social Network Analysis? There's a book for it with R code and a package to do
that. Good luck finding one in Python for these subfield of statistic. There's
a bayesian hierarchical analysis in Ecology and that book is in R.

4\. ggplot2 is amazing for static graphic. R doesn't have good dynamic graphic
out there and I kinda meh with Shiney. If you hate the syntax then you may
learn to appreciate it by reading it from the creator
[https://www.r-bloggers.com/a-simple-introduction-to-the-
grap...](https://www.r-bloggers.com/a-simple-introduction-to-the-graphing-
philosophy-of-ggplot2/)

~~~
int_19h
> R and Lisp are hardly alike even if it was inspire by it. It's like saying
> Erlang and Prolog is very similar. If you want learn FP do it in Erlang,
> Lisp, Haskell, etc.. Don't do it in R, it's half baked.

They are very alike in the underlying core design, not in how you use them.

In R, everything is an expression, and every expression is a function call.
Even things like assignments, if/else, or function definitions themselves, are
function calls, with C-like syntactic sugar on top. You don't have to use that
sugar, though! And all those function calls are represented as "pairlists",
which is to say, linked lists. Exactly like an S-expr would - first element is
the name being invoked, and the rest are arguments. And you can do all the
same things with them - construct them at runtime, or modify existing ones,
macro-style.

So in that sense, R _is_ actually pretty much just Lisp with lazy argument
evaluation (which makes special forms unnecessary, since they can all be done
as functions), and syntax sugar on top. Where it really deviates is the
data/object model, with arrays and auto-vectorization everywhere.

~~~
vertere
R certainly has a lispish code-as-data element to it, but it seems like it has
some serious flaws. Don't most lisps have functions and macros as separate
constructs? R has functions, but with some mucking around you can make them do
macro-type stuff. Then people write these half-function, half-macro things
(e.g. "non-standard evalation") that tend to break composability, either
totally or sometimes only in edge cases.

~~~
int_19h
Lisps do that distinction because they need it. In R, you can do everything
with functions, because arguments can be lazily evaluated, or you can even get
the syntax tree used for that argument at call site instead. So in R, a macro
is just a function.

And yes, it's easy to break stuff that way. Just as easy as it is with macros
(esp. non-hygienic ones).

~~~
lispm
> Lisps do that distinction because they need it.

Because of much better performance and predictability of code.

See: [http://www.nhplace.com/kent/Papers/Special-
Forms.html](http://www.nhplace.com/kent/Papers/Special-Forms.html)

~~~
int_19h
I'm not saying it's a better way to do things. It trades having fewer
primitives (and hence simpler language structure) for performance. But the use
of lazy evaluation is pervasive in R in general, so it's a conscious design
decision that they made.

------
hendiatris
>A R factor is a sequence type much like a character atomic vector except that
the values of the factor are constrained to a set of string values, called
“levels”. For example, if you have a table of measurements of some widgets and
each row corresponds to a single measurement of a single widget, you could
have a factor-typed column called measurement.type containing the values
“length”, “width”, “height”, “weight”, and “hue”, with the corresponding
numeric measurements stored in a “value” column.

This is a very bad example of what factors are for in R, because it makes it
seem like factors are for defining variables or keys in key value pairs. You
can use them for that, but it isn't the intended use. A better example would
be:

suppose you were comparing the amount of sugar in fruits based on several
growing locations, and you had three columns:

| Fruit | Location | Density (g/L) |

Fruit would be a factor variable (let's say it takes the possibilities of
apple, banana, orange), and location could be too, if it were a discrete set
of possibilities (as opposed to lat/lon coords)

This author seems to forget that R was built for working with data in an
analytical setting, unlike all of the languages he's comparing it to. It has
creeped into other areas, but that seems to be because in the hands of a
skilled user it is far easier to implement a data analysis solution. I'm sure
someone will come in and say how much better pandas is, but on the small
datasets, I'll stick with R, especially with how brittle and buggy matplotlib
is.

~~~
minimaxir
> This is a very bad example of what factors are for in R, because it makes it
> seem like factors are for defining variables or keys in key value pairs

That is the approach for _tidy_ data, which is used a lot in the R tidyverse
([http://tidyr.tidyverse.org/articles/tidy-
data.html](http://tidyr.tidyverse.org/articles/tidy-data.html))

~~~
ejstronge
>> This is a very bad example of what factors are for in R, because it makes
it seem like factors are for defining variables or keys in key value pairs

> That is the approach for tidy data, which is used a lot in the R tidyverse
> ([http://tidyr.tidyverse.org/articles/tidy-
> data.html](http://tidyr.tidyverse.org/articles/tidy-data.html))

Do you have a reference to where Hadley et al. suggest using factors in a key-
value system? I'm reading Wickham's books at the moment and have not seen this
assertion. Indeed, I believe he would not state this, as he explains the
utility of factors explicitly:

    
    
        A factor is a vector that can contain only predefined values, and is used to store categorical
        data... Factors are useful when you know the possible values a variable may take, even if you don’t
        see all values in a given dataset...
    

_Advanced R, pp. 21-22_

~~~
minimaxir
It was my interpretation of the original article quote that it was referring
to tidy schema, but I could be incorrect. (the gather() function of tidyr
names its parameters key and value as well, and the function is described as
"Gather columns into key-value pairs":
[http://tidyr.tidyverse.org/reference/gather.html](http://tidyr.tidyverse.org/reference/gather.html))

~~~
ejstronge
If you are interested in this topic and haven't seen _Advanced R_ , I'd
recommend taking a look - the book explains why those functions have key-value
pairs as parameter names. Note that the functions you cite aren't related to
factors.

------
wdkrnls
I don't understand why HN hates R. HN loves lisp, and R as a language shares a
much greater affinity with lisp languages than python or Go do. The language
was born out of the original authors reading SICP (as statisticians). Sure,
many of the users of R molded it to look like what they were used to (S), but
that just highlights the powerful metaprogramming capabilities of the
language.

~~~
ACow_Adonis
Whoa there.

I use lisp and R. While R evolved from lisp, which let's me understand how it
does certain things, I don't know if I'd describe it as more like lisp than
python.

Indeed, the analogy I use to describe to friends why I have a strong emotional
distaste for R is to use the following analogy:

Imagine you grew up as a heterosexual male. In your early years, you have fond
memories of a young girl whom you had a fling with.

She drops off your radar, and you run into her 30 years later. She's gotten
breast implants, botched her face with plastic surgery, and went through a
rather traumatic divorce and reinvention of herself.

To your friends who lived on an island where there were no women and kept in
basements and were regularly beaten by other stats programs, she might even be
beautiful, and she certainly pays them attention to their base desires that
they crave.

To you, she'll always be a mangled shadow of her former self and what could
have been...

~~~
int_19h
> While R evolved from lisp, which let's me understand how it does certain
> things, I don't know if I'd describe it as more like lisp than python.

It absolutely is more like Lisp than Python, once you strip the syntax away:

[https://news.ycombinator.com/item?id=17310259](https://news.ycombinator.com/item?id=17310259)

------
wdkrnls
R is much more lisp-like than python: more functional, more emphasis on DSLs
and metaprogramming, and the community is far more inviting to New comers:
reminds me a lot of Racket in that regards.

~~~
peatmoss
Yes! People ask me what the best R programming book I’ve ever read is, and I
like to say “How to Design Programs.”

I keep thinking someday I’ll try and build some of the missing stats
infrastructure in Racket. The problem at present is time and that this stuff
is real work!

------
fermienrico
Having used Python, JSL, Julia, R and Matlab; I agree with most of the things
in R. R is an extremely ugly language. It seems to be created by people who
wear capris and uggs (both at the same time). But, R has incredible packages,
especially the work done by Hadley Wickam. ggplot2 is beautiful. It is utterly
gorgeous. It is what Ted Baker is to the capri guys that designed the language
itself.

~~~
andrewla
ggplot2 produces beautiful graphs. I don't think it's beautiful as a package
-- the syntax is strange and reflects an earlier evolution of the ideas that
went into the tidyverse.

Notably the use of + instead of chaining operators, the use of a custom
"ggproto" object system instead of S3 (which makes extensibility a nightmare),
and the superfluous presence of the aes() function (rendered unnecessary by
better lazy evaluation tricks not really well-explored at the time).

~~~
digitalzombie
> the syntax is strange and reflects an earlier evolution of the ideas that
> went into the tidyverse.

Because it's the "grammar of graphic" see the link below.

[https://ramnathv.github.io/pycon2014-r/visualize/ggplot2.htm...](https://ramnathv.github.io/pycon2014-r/visualize/ggplot2.html)

If you don't like that syntax use another library. But ggplot2 how you code
graphic like that is amazing for me and many other people. I've tried SAS and
Matlab and ggplot2 is the best.

~~~
lottin
Personally I prefer lattice which is syntactically very similar to ggplot but
produces graphics which are more aesthetically pleasant IMO.

------
cwyers
> There are subtle differences and some authorities prefer <\- for assignment
> but I’m increasingly convinced that they are wrong; = is always safer. R
> doesn’t allow expressions of the form if (a = testSomething()) but does
> allow if (a <\- testSomething()).

...I am confused here. If you're testing for equality, R requires you to use
== and not =. If you try to test for equality with =, it throws an error
instead of treating it as an assignment. That's good. But who is trying to
test for equality with <-?

~~~
bo1024
I had the same confusion, can only assume the author is worried about this
typo:

    
    
        if(a < -b)
    

(which I assume is a less-than comparison, though I don't know R).

~~~
joker3
It is.

------
jdwyah
If you have tried R and found it painful I can’t say enough good things about
the “R for Data Science” book. Great overview of Tidyverse, ggplot. After 50
pages I was further along than my previous 5 years of googling and cursing.

------
notafraudster
There are a bunch of odd non-standard syntax choices in this tutorial. For
example, the author ends statements with semicolons. R does allow equal sign
assignment (although style guides prefer the stupid arrow syntax). The author
mentions Bioconductorm the... second biggest package repository for the
language?

I clicked because I was a programmer for 15 years before I used R, and I have
subsequently developed and shipped R packages, so I feel like I'm in a pretty
good position to get the visceral, cathartic, "argh" the writer here was going
for.

~~~
rossdavidh
the "stupid arrow syntax" is not nearly so stupid, and I speak here as a 10+
year Python developer, as the misuse of the equal sign that every C-style
language seems to think is ok. The = sign meant something long before computer
programming, and it is something the developer community ought to be ashamed
of that it is being used for "change this thing to that". /rant

~~~
YeGoblynQueenne
Well, the "=" operator is eas to type since it's on pretty much every keyboard
and probably has been for ever. And it's faster than typing a two-symbol
operator like := or <\- so.

If you want "=" to (more or less) mean what it used to mean "long before
computer programming", try Prolog.

    
    
      ?- a = a.
      true.
    
      ?- a = b.
      false.
    
      ?- A = a.
      A = a.
    
      ?- A = a, A = b.
      false.
    
      ?- A = a, A = B.
      A = B, B = a.
    
      ?- A == B.
      false.
    
      ?- A = B, A == B.
      A = B.
    

Nice? Most programmers would pull their hair from the root at all this :)

(hint: "=" is not assignment, neither is it equality and "==" is just a
stricter version thereof).

------
ggm
The first time I dived into R, I was confused.

The second time, I had a purpose and found enough code to copy to achieve it.
I was rewarded.

The third time, I had a more complex problem demanding use of JSON from
Elastic Search, and found that the two packages out there in git are basically
orphanware, use dplyr in extremely confusing ways, and offer little or no
advantage to simplistic HTTP fetching and direct to JSON parsing. Which is a
huge shame, because the idea of an elastic search abstraction is very
attractive. But. "it just didn't work out of the box"

I am very clear I am an R "consumer" not an R developer. But, at this point,
absent Shiny and a gui, I think that Python and Numpy has as much to offer me
basically.

Some people say the syntax is FP friendly. I have been trying to learn FP in
Haskell and I think R is about the worst notation you could invent to sell FP.

~~~
digitalzombie
Yeah I don't get these comment comparing Lisp and R rather Python and R.

R is such a bad language to learn FP in.

------
floki999
Great guide. R syntax is awful, no matter how you slice it and would have been
the tool of choice before Python could walk. Still, it is very powerful and
great to have around.

------
kasperset
I use R most of the time and I find R notebooks very data exploration
friendly. It makes it easy to back and forth just like Jupyter notebook.
Producing HTML files from Rmarkdown files is also analysis friendly.

99% of the time I use tidyverse with no noticeable impact on the performance.
For that occasional 1%, I must admit datatable package works out really well.
tidyverse pipes are so unixy that makes it easy to transition to command such
as cut, head, sort and column if needed without any mental contortion.

I have used Python occasionally and with method chaining, it can almost
simulate the "dplyr" like syntax. However, it is hard to find some obscure
statistical test out of the box which is easy in R.

------
Gatsky
There are some highly productive researchers who have taken the time to write
well constructed and very useable packages in R, married with meticulous
documentation. The same individuals or groups of 1-3 people have also
maintained said packages for 5 years or more, and regularly respond in person
to queries. Two examples are ggplot2 and limma.

To me, this is all the encouragement I need to use R.

------
CharlesMerriam2
Some reading this will claim any criticism is the fault of the critic. Others
will jump in claiming it is all revealing the emperor's clothing and promoting
an alternate religion.

A few will deconstruct the criticisms and look for the small documentation or
even language changes to solve something.

I applaud the final group.

------
dre85
Every error message ever written in R: "Error"

Hmmmmm, okay after 20 minutes of squinting at the script I see there's a
lowercase letter at the header name of the last column somewhere in the middle
of the 200 lines...now we can move on to debugging the next "Error"...

------
haihaibye
[http://bioinfomofo.blogspot.com/2014/01/r-hard-things-are-
ea...](http://bioinfomofo.blogspot.com/2014/01/r-hard-things-are-easy-and-
easy-things.html)

------
SubiculumCode
I don't use R to write programs. I wrangle data, run analysis, and plot
results. It has a great number of solid stat packages for mixed modeling,
clustering, ordination, etc. That is why I use R.

------
niceperson
I thought I was the only one who hated R. Guess not. I gave up trying to make
a simple repreeeesentation when I couldn't find a tutorial on how to import
data into R without using fucking excel.

------
rumcajz
The language is really ugly and painful to use. Have someone considered making
a nicer language that would compile to R?

------
ergodiclife
TL;DR. I just have two things to say:

R worshippers: "To a man with a hammer, everything looks like a nail."
Interactively manipulating tables and producing visualizations is not what
software engineers/programmers on HN would call "programming". Try learning a
compiled programing language like C and creating a tool or three.

R haters: "It doesn't matter whether the cat is black or white, as long as it
catches mice." Remember, R was designed by statisticians for statisticians --
nothing more, nothing less. Try manipulating a tabular dataset and producing
visualizations in R, and see how easy and painless it is. There's a good
reason behind all the hype.

------
senatorobama
This guy just made himself unhireable.

------
the_anon_coward
"See and despair: x<-y (assignment) is parsed differently than x < -y
(comparison)!"

And that guy talks about computer science? "<-" is a single token, what is so
hard about that? It is a lexing issue, not a parsing issue!

Surely one cannot accuse OCaml of being written by laymen:

    
    
      # type r = { mutable x : int };;
      type r = { mutable x : int; }
      # let y = { x=10 };;
      val y : r = {x = 10}
      # y.x <- 100;;
      - : unit = ()
      # y.x < -10;;
      - : bool = false

------
dxbydt
I don’t hate R as much as I hate universities insisting on mandatory use of R
for all comp-stat courses. This to my mind verges on civil rights
infringements. Bear in mind we aren’t talking about a private institution such
as a company, where when you sign on as a dev for a paycheck, you do so
voluntarily, knowing that the company uses X language and you won’t have a
choice in the matter. In a public university, students, especially grad
students, who go on to do research and write papers etc., must have a choice
in what they use. If I don’t like R, doesn’t matter what the reasons behind my
dislike, I should have a choice. Let me use numpy, scipy.stats and pandas. How
does that bother you ? First of all, you should be teaching statistical
concepts, not syntax - so this whole notion that graders & TAs don’t know
python is nonsense. Let them grade my numerical answers, not the R syntax used
to get that answer. And at that point, how does it matter if I use R or python
to get my answers ? Sorry, had to get that off my chest ( and don’t even get
me started about sas )

~~~
edtechdev
It's better than forcing students to pay for proprietary statistical analysis
tools like SPSS, etc.

~~~
curiousgal
There are running jokes amongst stats students about those who resort to using
SPSS and EViews. It's mostly because of the GUI as most of the students use
SAS (proprietary and expensive) as well as R.

