|
|
|
|
|
by glofish
2381 days ago
|
|
Hadly Wickham is a hero of the language, single-handedly tries to wrestle the slippery monster into sanity, I think long term is a losing battle because in the end the language is still borked. My hat off to him though! As for the language ... consider this: lapply(), sapply(), tapply(), vapply() each does something different. The language allows two kinds of assignment operators even: a=1 or a <- 1 that are "almost" identical ... good luck, here is a language there are two ways to even assign a value to a name. |
|
The <- assignment is normal for functional programming languages. F#, OCaml, S, and more use this operator. This is because the arrow key used to be a physical key on keyboards back in the 70s when FPP was popular and brand new.
The = sign (function assignment operator) is function level scope and <- (assignment operator) is top level scope.
eg:
So therefor, is equivalent to It's a convenient feature the language supports. The alternative is how Python does while loops. If anything, R comes out above in this regard.edit: Python has the := operator which functions the same way <- does in R. I guess Python is catching up on this one.
eg (Python):
vs