Multi-line comments in Erlang
Zvi
zvi.avraham@REDACTED
Mon Dec 13 10:40:55 CET 2010
Please,
no need to turn this into religious war and no need to imply that your
process or software engineering practices are better than mine. If
majority of people doesn't like multiline/HEREDOC comments - so be it.
I have no idea, why people imply, that I should use emacs/vim or that
I use multiline comments to comment executable code or that I don't
use git or ClearCase.
Language design usually doesn't have anything to do with editors,
IDEs, DVCS or your organization coding conventions. Unless it's some
kind of exotic language fused into IDE/executable environment.
The reason I posted this is because I found out, that Matlab/Octave
supports this style of comment (%{ ... %}), even that it's IDE has
perfect support for commenting and uncommenting entire sections of
source files with end of line comments (... % COMMENT).
Now Matlab is not the best example of programming language, but I
think in this particular feature they did it right.
Zvi
On Dec 10, 1:21 am, Ryan Zezeski <rzeze...@REDACTED> wrote:
> On Dec 9, 2010, at 4:48 AM, "Zvi ." <zvi.avra...@REDACTED> wrote:
>
>
>
> > 3. Free format is the king! Language designers shouldn't dictate programmers
> > how to format and ident their code.
> > How differnt is starting comment line from '%' in Erlang, from putting 'C'
> > or '*' in the first column in FORTRAN?
>
> > Zvi
>
> Really? If free format is king then why does every lang have common code conventions? For example, I hate CamelCase but that doesn't mean I'm going to start naming my variables camel_case in Java because my coworkers would take me out back and beat me.
>
> There should always be a middle ground between extremes but without some type of common conventions our code would be a tower of babel, more so than it already is. People make certain assumptions, and when you break those assumptions confusion, contempt, and even bugs can ensue.
>
> I don't see the need for multiline comments as described in this thread. Any reputable editor can handle it. I know I have no problems in Emacs or Vim.
>
> I also know in the past multiline comments in C++ has bitten me because I nested them in order to comment out code. As has been said, good SCM takes care of this for you, git stash and branch come to mind.
>
> -Ryan
More information about the erlang-questions
mailing list