Open jonocarroll opened 8 years ago
It's still true that they are not any sort of operator; the method overloading code just understands certain magical names that happen to use .
as a separator and dispatches to them at runtime.
I should really add a section on the different class systems!
Also a leading dot in a name will make it "special" in some sense, e.g., ls
will not return its name unless 'all.names' is set to TRUE. Also isolated dots have been taken over as meaningful in tidyverse syntax. Arguably this does require consideration of scope.
I'm not sure if you're still updating, or what your understanding is at this point, but this bit is slightly off. Dots are used in function names for method overloading (by class), so
print(x)
dispatches differently depending on the class ofx
.For example,
print(data.frame(x))
actually callsprint.data.frame(x)
, but you may want to callprint.default()
explicitly.