How does D improve design practices over C++?

Bill Baxter wbaxter at gmail.com
Thu Nov 6 15:58:43 PST 2008


On Fri, Nov 7, 2008 at 6:57 AM, Tony <tonytech08 at gmail.com> wrote:

> Obviously I take language feature "recommendation" with a grain of salt. I
> do #define because I've never had any problem with it (and look at the
> Windows header files sometime!) and #defines don't create a data object in
> memory. It's simply never been a problem.

Ack!  Windows header files are probably the best example in the world
of why using the preprocessor is a BAD idea!
 The main reason the preprocessor is evil is because it does
completely ignores scoping rules.  I guess you've never had the
misfortune of trying to name a method inside a class "GetObject", or
any of the other various common words and phrases the Windows headers
#define.

--bb



More information about the Digitalmars-d mailing list