Good day,

Some programming languages, such as C++, allow function overloading. Is it 
possible to mimic it when creating S4 methods?

An example from an undergraduate text book is:

int largerInt(int x, int y);
char largerChar(char first, char second);

You can write the previous function prototypes simply as

int larger(int x, int y);
char larger(char first, char second);

Conversely, it does not seen to be possible to use different formal argument 
names for a S4 generic, unless I don't know about some obscure trick to do it.

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to