From: Rodrigo Rosenfeld Rosas Date: 2010-12-28T21:12:53+09:00 Subject: [ruby-core:33958] Re: Multi-line comments Em 28-12-2010 08:56, Loren Segal escreveu: > > > On 12/28/2010 5:41 AM, Rodrigo Rosenfeld Rosas wrote: >> On 28-12-2010 01:54, Joshua Ballanco wrote: >>> Do "=begin" and "=end" not work for you? >> >> These are not meant to be used as a multi-line comment, but to >> generate documentation instead. > > =begin/=end aren't specific to documentation, they just happen to be > processed by documentation tools (RDoc, YARD). Keep in mind that > regular "#" comments are processed by documentation tools as well, so > there's actually no difference here even if they were "documentation > specific". > > The only *real* difference is that you have to align the keywords to > the beginning of the line, which can be visually ugly if you're using > these multi-line comments for something more than temporary > comment-out-ing. > > - Loren Yes, that remembers me another comment style like: render 'some/view', /* template: 'fancy', */ format: 'xhtml' Regarding documentation, I like the format used by Doxygen and Javadocs, like using /** */ (or /*! */) and //!. I don't understand why the same idea was not followed in Ruby, like using '#!' and '/*! */' besides '=begin/end'. Rodrigo.