[erlang-questions] Multi-line comments in Erlang
Zvi .
zvi.avraham@REDACTED
Thu Dec 9 10:48:45 CET 2010
1. The beauty of dynamic languages is that you don't need tools and IDEs!
And even if you do use tools, many times you work not on your machine or on
target headless environments, with only basic editor available, or with
editor that you know poorly or which didn't configured with your macros,
etc.
2. Comments are essentially Natural language (let's say US English)
document, embedded into Programming language (Erlang) document.
Therefore, embedded document should be left intact. Ideally I would like
comments to be something, like HEREDOC.
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?
4. In other languages, that doesn't have multiline comments I often use
ifdef(false) macro, or outright if(false) to "comment out" parts of code. I
think it's uglier, than proper multiline comments, but still better than
comment every single line.
Zvi
On Tue, Dec 7, 2010 at 8:20 PM, Rapsey <rapsey@REDACTED> wrote:
> Is it that important? Any proper programming editor can comment/uncomment
> multiple lines.
>
>
> Sergej
>
>
> On Tue, Dec 7, 2010 at 5:49 PM, Zvi . <zvi.avraham@REDACTED> wrote:
>
>> Why do you think it's not possible?
>> It's just simple change to Erlang source code parser.
>> Probably this should be submitted as EEP, so OTP team will consider it.
>>
>> On Tue, Dec 7, 2010 at 6:25 PM, James Churchman <jameschurchman@REDACTED
>> >wrote:
>>
>> > not posible in erlang, but many editors (eg i use textmate) will comment
>> > and uncomment multiple lines with % on each line..
>> > On 7 Dec 2010, at 15:32, Zvi wrote:
>> >
>> > > Hi,
>> > >
>> > > Matlab/Octave has single line comments, like Erlang (i.e. starting
>> > > with '%' sign). But it also have multi-line comments, like for
>> > > example:
>> > >
>> > > %{
>> > > this is example
>> > > of multi-line
>> > > comments in Matlab
>> > > %}
>> > >
>> > > which is equivalent to:
>> > >
>> > > %this is example
>> > > %of multi-line
>> > > %comments in Matlab
>> > >
>> > > How difficult is to add comments like this to Erlang?
>> > >
>> > > Thanks,
>> > > Zvi
>> > >
>> > > ________________________________________________________________
>> > > erlang-questions (at) erlang.org mailing list.
>> > > See http://www.erlang.org/faq.html
>> > > To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>> > >
>> >
>> >
>>
>
>
More information about the erlang-questions
mailing list