How does D improve design practices over C++?
Tony
tonytech08 at gmail.com
Fri Nov 7 14:09:58 PST 2008
"Janderson" <ask at me.com> wrote in message
news:gf0hf3$9nf$3 at digitalmars.com...
> Tony wrote:
>>> "Janderson" <ask at me.com> wrote in message
>>>> Also #defines really arn't a problem for cpu at compile time, your
>>>> right there. I'm trying to point out that using #defines for const is
>>>> totally rediculus (sorry for being so harsh). No C++ book or expert
>>>> would recommend it and it doesn't result in any run-time optimisation
>>>> what so ever.
>>>
>>> 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. Now if one is "hell
>>> bent/anal" about "doing away with the preprocessor, power to them, "it
>>> ain't me" though. I don't want the template machinery taking over the
>>> capability of the preprocessor: I use it to mutate the language and
>>> experiment. I will probably implement a preprocessor to replace or add
>>> to what I have with C++ before I jump into compiler development for my
>>> language that is evolving.
>
>
>
> It seems you might need to think outside of the C++ box.
That's an odd statement considering that I came here to investigate D and am
defining what to put into my own language (or one I wish someone would
implement) because of the issues I have with major "features" of C++ (and
D).
> There are much more powerful processors then the one that comes with C++.
And that's probably the first step I'll be taking: creating a preprocessor
or pre-preprocessor.
> As to the windows. These where designed for C not C++.
Indeed.
> Even MFC is old and something Microsoft has not supported for a long time.
> It was created during the transition time from when Microsoft was
> switching from C to C++. Look at where microsoft is going (.Net, C#,
> managed C++), what do they no-longer use? Look at C++0x, what are they
> changing, what are they adding to reduce macro use?
>
> I'll leave this as an excise to u because I fear if that I tell you'll
> just want to argue more.
I used to code professionally using MFC and Borland's OWL (in the mid
nineties), and the Win32 API directly before that. Believe me, I know what
to hate about those things. Using #define is relatively minor compared to
major design issues. Debating on whether or not to use #define for constants
is right up there with where to put opening braces. It's a waste of time.
> If you find it for yourself you might be more inclined to be more open
> minded or at least present some more informed arguments.
You're the one arguing, not me. Time to look in the mirror dude.
Tony
More information about the Digitalmars-d
mailing list