Why I chose D over Ada and Eiffel

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Tue Aug 20 22:53:22 PDT 2013


On Tuesday, 20 August 2013 at 20:24:21 UTC, Ramon wrote:
> @Timon Gehr
>
>> Here I'd tend to disagree. Code duplication is the compiler's 
>> job.
> I get your point but I disagree.

No I disagree :)

There has been several months, or more, of research going into 
reusable code. Languages include things like functions, modules, 
and even classes to help produce code which can be shared across 
many applications. Some languages research polymorphic data to 
provide generics. To suggest that a language isn't needed to 
handle code duplication because an IDE can duplicate it for you 
is absurd.

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. To have the IDE do this still has the core problem. One 
could create a syntax for the IDE to expand the code before 
compilation allowing for a single location of logic... but now 
you've just invented a non-standard macro language that could 
have just been dealt with in the compiler.


More information about the Digitalmars-d mailing list