From: Edward Elliott on
Sion Arrowsmith wrote:
> Jorge Godoy <godoy(a)ieee.org> wrote:
>>Is it harder to remove "n" lines of code commented out with "#" than "n"
>>lines of multiline commented code? How?
>
> I'd say it's harder to remove the latter, due to having to search for
> the end of comment sequence, rather than simply looking for where the
> block comment stops.

Like I said, it's debatable. Depends on the editing conditions you assume.
It's easy to imagine situations where either type comes out ahead.
From: Edward Elliott on
Jorge Godoy wrote:
> Edward Elliott wrote:
> Try using Subversion. You can work and make diffs disconnected from the
> network.

rcs isn't the issue. I'm already assuming a local store, a networked one
just makes my argument even easier.

>>I'm not saying nested comments solve every problem, just that
>
> I don't miss them. :-)

Fair enough.

> Well, I believe they are since it looks like a habit of yours to use
> multiline comments. It is common for people coming from other programming
> languages that support them.

Yes I cut my teeth on C, C++, and Java. That was a long time ago. I don't
miss them because they're more C-like (the C-family actually has an awful
implementation), I miss them because they're useful. Actually I never used
multiline much until I did a project in ML and saw how they should work.

However the last 4 years I've used Perl, Python, and PHP almost
exclusively. I'm used to single-line comments, I just find their
expressive power lacking. No shame in borrowing the best features of other
languages.
From: rx on

>
> Also, if you remove the start of the block first, then your editor might
> not
> be highlighting anymore... With nested comments things get even worse
> because you might miss the end of the outer block or something like that.
>
> --
> Jorge Godoy <godoy(a)ieee.org>
>

I have commented out a lot of C++ code and miss the block feature in python
more than I missed the nested comments in C++.
Besides nothing really strange happened.
Sometimes you just need to dissable some of the code temporarly as quickly
as possible, and I like that it is not higlighted any more, since I will not
look into it before I dissable the comment.


From: Edward Elliott on
Peter Tillotson wrote:
> discouraged except where vital. Perhaps we should make them really hard
> and elegant - mandate latex/mathml markup so good editors can display
> the equations we are implementing :-)

I like this guy already! :)
From: Edward Elliott on
Jorge Godoy wrote:
> You can use either """ or '''. I don't keep changing them in my code, so I
> can always use the other type (usually I use " so for commenting things out
> I'd use ') to do that.

It's close, only problem is it doesn't nest. It'll have to be good enough
for now.

>>Forcing programmers to write clean code with syntax is like teaching a pig
>>to sing: it wastes your time and annoys the pig. Good coding is a state
>>of mind, not a parser option.
>
> If the latter can help, why not?

Because in this case it limits the expressive power of the language.
Multiline comments enable clearer communication of intent (see earlier post
for some reasons why).
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: how do you pronounce 'tuple'?
Next: A Unicode problem -HELP