I do not understand why one should use a S3 preferentially on a S4 class, if S4 is more rigorous.
(The premiss is I am a newbie with OO programming in R, and would like to understand what is the "proper" way to OO program in R ....) Regards On Saturday 29 August 2009 16:23:39 hadley wickham wrote: > >> An opening curly brace should never go on its own line; > > > > I tend to do this: > > > > f <- function() > > { > > if (TRUE) > > { > > cat("TRUE!!\n") > > } else { > > cat("FALSE!!\n") > > } > > } > > > > (I don't usually put one-liners in if/else blocks; here I would have > > used ifelse) > > > > I haven't seen many others format code in this way. Is there an > > objective reason for this (such as the rule for the trailing "}") or > > is this just aesthetics? > > It's probably just aesthetics. I don't like it because it increases > the number of lines without much real benefit - indenting already > gives you all the hints you need. > > Hadley -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct...@york.ac.uk ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.