December 2017
Beginner to intermediate
470 pages
12h 29m
English
Another big difference with popular object-oriented languages like the ones mentioned before is that R implements parametric polymorphism, also known as generic functions, which implies that methods belong to functions, not classes. Generic functions allow the same name to be used for many different functions, with many different sets of arguments, from many different classes. This means that the syntax to call a class's method is different from the normally chained syntax you find in other languages (normally implemented with a "." (dot) between a class and the method we want to call), which is called message-passing.
R's method calls look just like function calls, and R must know which ...