[erlang-questions] Multi-line comments in Erlang
Fri Dec 10 00:21:56 CET 2010
On Dec 9, 2010, at 4:48 AM, "Zvi ." <> 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?
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.
More information about the erlang-questions