I've been examining this rather old question and playing around with different functions and classes. As it can be seen below, a single call to setGeneric
can result in some notation I've never met before in R.
setGeneric("+", function(e1, e2) standardGeneric("+"),
useAsDefault=base::`+`)
#Creating a new generic function for ‘+’ in the global environment
#[1] "+"
1 + 1
#`__Deferred_Default_Marker__`
So, what does "__Deferred_Default_Marker__" mean? Is it an "error" or some sort of "undefined behaviour"? FWIW, rm("+")
restores the operator and 1 + 1
is again 2
.