Source changes should include date of change

tide tide at tide.tide
Sat Sep 8 12:35:32 UTC 2018


On Saturday, 8 September 2018 at 11:29:15 UTC, Josphe Brigmo 
wrote:
> On Saturday, 8 September 2018 at 07:08:46 UTC, Colin wrote:
>> On Saturday, 8 September 2018 at 06:59:28 UTC, Josphe Brigmo 
>> wrote:
>>> Having source code that doesn't show changes with dates is 
>>> pretty useless for diagnostics. I realize that git has the 
>>> changes but the source code should.
>>>
>>> If some code is added or changed it is very simple to add the 
>>> date of change in a comment.
>>>
>>> // Date: Date1, Date2, Date3, ....
>>>
>>> Anything below a was changed at those dates.
>>>
>>>
>>>
>>> Why not also add a link to the git hub patch or bugzilla or 
>>> whatever?
>>
>> Git is the tool that's used to manage changes, including 
>> viewing the changes.
>>
>> A lot of dev time has gone into it and it works really well.
>>
>> Some ad hoc comment system in source code to point out changes 
>> will never be as good.
>>
>> Just Use Git!
>
> Um, I didn't say don't use Git!
>
> Your illogic is that you believe that one can have only one or 
> the other when one can have both. Hence, you are excluding a 
> completely valid addition. You think it is an alternative. You 
> are wrong. Please think about the question before you answer 
> next time so that you don't get in the habit of doing it. No 
> one said that Git couldn't be used and telling me to use it is 
> very arrogant of yourself.
>
> The fact of the matter is that dates in source code will help 
> when git is not available and one only has the source code.

Dates won't help, if you have a comment with a date that states 
everything under it was modified at that date. What happens when 
there's a split of 3-4 lines between modifications? Just how many 
of these comments are there going to be? This will be unusable, 
adds very little useful information, won't work for past changes 
overwritten changes and deletions.

Just use git, that's what it is designed to do without polluting 
source code with useless comments. If you have the source code, 
there's no reason you won't have the git repo as well. It can all 
be stored and used locally on your own machine.


More information about the Digitalmars-d mailing list