Why version() ?

Derek Parnell derek at psych.ward
Tue Feb 10 16:23:02 PST 2009


On Tue, 10 Feb 2009 14:01:29 -0800, Walter Bright wrote:

> Derek Parnell wrote:

>>  ... it creates a new problem; code
>> duplication.
> 
> I don't think that duplicating a small run of code is a problem.


My apology. The problem is more than run-time performance issues. The more
pressing problem, IMHO, is the one of maintenance costs. Duplicated code is
a significant cost burden. Not only may each duplication require updating,
but there is extra effort in analyizing every duplicate to see if it *does*
need updating. And every act of updating increases the opportunity for
introducing bugs.

Coders need languages that help them do their job, and one way to help is
to reduce the need for duplicated code.


>> Duplicating (nearly all of a) source file is NOT, repeat NOT, a
>> satisfatory solution.
> 
> I'm not insensitive to this as I do it myself in maintaining Phobos. It 
> is a problem, but not a huge one. I find that the meld utility (on 
> linux) makes this chore a snap.

Because of D's limited support for text macros, I am using third party
tools to get me out of this problem too. 

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list