[erlang-questions] Multi-line comments in Erlang
Frédéric Trottier-Hébert
fred.hebert@REDACTED
Wed Dec 8 16:33:28 CET 2010
This will only work around a form (function definition, module attribute), and not within it. You won't be able to comment out only a branch of a case, or part of a function definition. Only the whole thing. This makes it less useful when wanting to comment out clauses of an OTP module.
I've found the lack of multiline comments annoying in the past, but most of the time, having the editor (vim in my case) handle it for me has been fine most of the time. It fails at commenting only part of a line when doing very specific tests and debugging, but that's about it.
--
Fred Hébert
http://www.erlang-solutions.com
On 2010-12-08, at 10:27 AM, Bengt Kleberg wrote:
> Greetings,
>
> For commenting out code, it is possible to use:
>
> -ifdef(never_defined).
> ...code
> -endif().
>
>
> bengt
>
> On Wed, 2010-12-08 at 15:39 +0100, David Mercer wrote:
>> On Tuesday, December 07, 2010, Richard O'Keefe wrote:
>>
>>> Nesting comments are one of those clever ideas
>>> that turn out to be really dumb, because they don't actually work.
>>
>> I'll bite, mainly because I've sometimes thought nesting comments would be
>> helpful, for instance, when commenting out large blocks of code, but it is
>> rare that I get to work with a language that supports them. Since you're
>> almost always right about such things, why do you say that they don't
>> actually work?
>>
>> Cheers,
>>
>> David
>>
>>
>> ________________________________________________________________
>> erlang-questions (at) erlang.org mailing list.
>> See http://www.erlang.org/faq.html
>> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>>
>
>
> ________________________________________________________________
> 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