|
|
|
|
|
by xerula
4542 days ago
|
|
Also "=" is compulsory for setting some named function arguments that have a default value. E.g. format(pi, digits <- 16) only prints with the default number of digits, format(pi, digits=16) works as expected. I think it's nice to have a syntax that distinguishes between object and argument assignment. Also you can do things like this when you're bored: ((a <- b <- 1) + 1 -> c) + 1 -> d (Someone also once told me that "=" for normal assignment sometimes fails in unexpected ways in tryCatch blocks, but I don't know how or why.) |
|