Hi,

2012/3/15 Denis Washington <den...@online.de>

> Am 15.03.2012 08:09, schrieb Nikita Kitaev:
>
>  On Wed, Mar 14, 2012 at 4:29 PM, Denis Washington<den...@online.de>
>>  wrote:
>>
>>> Why commenting out? Aren't version control systems there exactly so that
>>> you
>>> don't need to keep such cruft in the current code? I am really wondering
>>> about the huge amount of commented-out lines in the codebase.
>>>
>>
>> In this specific case the code is so obvious that can go away, and that
was my original intention, but that's a file beyond my knowledge, and so, I
didn't want to touch anything.

 Many of the comments are cruft code, and I agree that those should go.
>> But others are full features! The classes and methods are all there,
>> but the code is incomplete in some way. For example, to do the GUI for
>> guides I uncommented a couple sections of code, and then iterated
>> until I fixed most of the bugs.
>>
>> It would definitely be a good idea to eliminate all commented-out
>> code. At the scale of large code blocks and major features, however, I
>> prefer to fix stale code instead of implementing something from
>> scratch. (Much of it was written by Synfig's original authors and
>> interfaces well with the software). Maybe that's just me.
>>
>
> How about moving all the commented-out code into a separate "staging"
> branch? This would allow development of features out of the commented-out
> code as you are describing, but master would still stay clean.


That solution would be nice, but if we did so, we wouldn't be able to
update the staging branch by merging master into it because we would lose
then the comments. So, we would have to keep it as an abandoned branch, and
so, making it more and more difficult, as time goes by, to reuse commented
out code.


>  Actually going through the comments and analyzing them takes a lot of
>> effort. I tried doing that in synfig-studio but eventually lost
>> momentum. Perhaps it's worth it to just delete all of the stale code
>> in one pass and start fresh.
>>
>
I don't like this solution by the same thing you said before: there is
commented out code that actually implements features, or things that used
to work at least, that have been for some reason disabled but until we
reimplement or supersede them, I don't think that code should go away.

It's true that the high amount of commented out code is disturbing when you
have to edit a file, but the only thing I can suggest is that you fold it
in your editor.

Best regards,
Diego.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to