Why I chose D over Ada and Eiffel

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Aug 21 10:12:06 PDT 2013


On 8/21/13 3:53 AM, Andrej Mitrovic wrote:
> On 8/21/13, Jesse Phillips <Jesse.K.Phillips+D at gmail.com> wrote:
>> I don't frown on copy-paste code because "it's the thing to do"
>> or because it causes more typing. copy-paste is bad because your
>> logic is now duplicated and requires twice (on a good day) the
>> updates.
>
> Speaking of which someone should try and make a D de-duplication
> project (perhaps using Dscanner[1]), which would print out all the
> duplicated code segments in a D codebase. I think it would be a neat
> thing to have.
>
> [1] : https://github.com/Hackerpilot/Dscanner

Awesome idea. One would run the deduper over a codebase and e.g. show 
the top 10 longest repeated subsequences. Those could be refactored into 
functions etc.

The deduper would be insensitive to alpha renaming, e.g. "int a = 10;" 
and "int b = 10;" would be identical.


Andrei




More information about the Digitalmars-d mailing list