philosophical Perl question

ynotravid

Senior member
Jun 20, 2002
754
0
0
Why doesn't Perl have multi-line comments?

I am fairly new to Perl and one the first things that I've noticed is that Perl doesn't have support for multi-line comments. Although there are work arounds for this I don't see any good reasons as to why it isn't a part of the perl compiler(you know what I mean) itself.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Because when I put a # at the beginning of a line vim autmatically puts one at the beginning of the next line for me?
 

ynotravid

Senior member
Jun 20, 2002
754
0
0
what if you wanted to comment out large blocks of pre-existing code for say debugging purposes?
 

ynotravid

Senior member
Jun 20, 2002
754
0
0
Originally posted by: singh
Because most programmers don't use Perl ;)
Point taken, but it's not like it would take a major structural overhaul in order to acomplish this. Even if it were only Lary Wall himself usin this language it would seem to me sensible to include that kind of functionality.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It also seems you can use POD directives like:

=begin comment

This is a multiline
comment

=cut comment

There is a discussion on this for perl6, the main technical problem is picking good notation to mark the comments because common things like /* and // are used by the regexp engine.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
When I need to comment out code for debugging purposes I usually encapsulate the stuff I want commented by making it a sub-routine and not calling it :)
 

ynotravid

Senior member
Jun 20, 2002
754
0
0
Good work arounds, I hadn't heard that one befor Mucman. But I guess my question is why is the need for multi-line comments still a question. There are plenty of character combonations still available. And while you can get around the problem, there is no good reason, I can see, why you should have to.