From: Josef 'Jupp' Schugt Date: 2003-06-17T08:12:48+09:00 Subject: Re: Multiline comments? Saluton! * Christoph Tapler; 2003-06-16, 20:53 UTC: > I'm new to Ruby and I'm wondering that there is no possibility to > write comments over more than one line. Just like in C for example > with > /* this is a > multiline comment */ > > Is there any possibility to do this or is there a fundamental > (architectural or whatever) problem? The only acceptable application for multiline comments is commenting out part of a program. That can be done by means of =begin =end For every other purpose 'from mark to end of line' comments are a matter of common sense. This has two aspects: A mark is necessary to avoid surprising behavior of programs. I remember a math student who almost went crazy because his F90 program did print unexpected results. What had happened? He did use the wrong compiler options so that the program was compiled as a F77 one with anything behind column 72 being ignored. The problem was that that left a valid program. He had been searching for the bug for *hours* because they only did teach them Fortran 90 so he didn't know of that issue. The lack of an end marker is advantageous because if you cannot forget or misspell it there is no chance that the commented region accidentally is larger than expected. Both problems could be avoided if all people would use an editor that is capable of syntax highlighting but unfortunately many don't :-< Taking a pragmatic point of view there is no reason not to use single-line comments. If modern editors break lines they also add a comment character. Josef 'Jupp' Schugt