Henrik Bengtsson
2010-Sep-22 06:26 UTC
[Rd] OT: Reason/history behind ## notation for comments?
Off topic, but since I've observe both styles, does anyone know the history behind/reason for using ## instead of a single # to start comments in R. I know some editors do this by default. Is it because in C it is easier to distinguish (search/replace/...) comments from C preprocessor directives such as #include, and that's became a de facto standard elsewhere? /Henrik PS. I don't want to get into a debate on what's the best style.
Laurent Gatto
2010-Sep-22 07:33 UTC
[Rd] OT: Reason/history behind ## notation for comments?
For what concerns emacs users, the number of '#' has different effects on the position of the comment. From the ESS manual: 'By default, comments beginning with ?###? are aligned to the beginning of the line. Comments beginning with ?##? are aligned to the current level of indentation for the block containing the comment. Finally, comments beginning with ?#? are aligned to a column on the right...'. I guess that ## is the most wanted indentation for comments. Best wishes, Laurent On 22 September 2010 07:26, Henrik Bengtsson <hb at stat.berkeley.edu> wrote:> Off topic, but since I've observe both styles, does anyone know the > history behind/reason for using ## instead of a single # to start > comments in R. ?I know some editors do this by default. ?Is it because > in C it is easier to distinguish (search/replace/...) comments from C > preprocessor directives such as #include, and that's became a de facto > standard elsewhere? > > /Henrik > > PS. I don't want to get into a debate on what's the best style. > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >