[R] Block comments in R?

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Oct 9 02:03:29 CEST 2006


Apparently misunderstanding the argument,
BBands <bbands at gmail.com> wrote:
	Should R be editor specific? Or should it be editor neutral?
	
R is, and should remain, editor-neutral.
Amongst other things, it should NOT acquire misfeatures
in order to support editors that happen not to support comment-region.

	In my view blocks comments are a desirable, editor-neutral approach.
	
Block comments are indeed editor-neutral,
but they do not solve any problem that R currently has,
and they ARE in practice highly error-prone.

	Note that most of the more recent languages have some form of block
	comment capability.
	
	http://en.wikipedia.org/wiki/Comment#Summary
	
That list is not a list of "more recent languages"; it is a list containing
both old languages and new ones.  Some of the entries (such as the one for
Algol 60), are clearly wrong.  (In fact the Algol one is doubly wrong,
because the language always was Algol, not ALGOL.)  So is the Scheme entry
wrong: there are no block comments in any official version of Scheme and
never have been.  The list is missing Burroughs Algol (% end of line
comments), Prolog (%...\n and /*...*/), Pop-2 (!...! or !...\n), and many
others.  If you want to be pedantic, the list is technically wrong about
C and C++.  We also find COBOL, with some interesting variants, missing.
Texinfo is another one that's wrong.  Quite a lot of entries are wrong.
If "more recent languages" just means languages that are still in use,
it's a pity APL isn't there; the APL "lamp" character (comments are supposed
to be illuminating, no?) U+235D is cute.

We find
    - languages which have copied PL/I  (/* ... */)
    - languages which have copied BCPL (//)
    - languages which have copied Pascal (* ... *)
    - languages which have copied sh (#)
    - languages which have copied Burroughs Algol (%)
    - Fortran (only ever end-of-line comments, first C and now !)
    - BASIC (only end-of-line ' and REM comments, and you would certainly
      have to call VB.net "recent")
    - eclectic languages

    - languages designed for high reliability, notably Ada and Eiffel (--)

Basically, most language designers have pretty much blindly followed
designs from the 1960s, with the notable exception of Ada and Eiffel.

The Haskell experience is instructive.  The Haskell designers thought they
could put in nesting block comments {-...-} and make them work.  But it
took several iterations of fiddling with the details, and they *still*
don't work in every case.



More information about the R-help mailing list