Windows Header consts

Prudence via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 7 12:06:46 PDT 2015


On Monday, 7 September 2015 at 18:58:08 UTC, Adam D. Ruppe wrote:
> On Monday, 7 September 2015 at 18:42:59 UTC, Prudence wrote:
>> because it is confusing and hard for you to understand over
>
> Nope, I'm saying it is a pointless change. If you do that, 
> EVERY time you want to look something up, you need to rewrite 
> WM.* into WM_* since that's what the docs say. And then EVERY 
> time you copy/paste code from C or, again, the docs, you need 
> to change it the other way. (and moreover, it won't even work, 
> since like you pointed out, some enums have static if in part)
>
>
> That's a big hassle... and what's the benefit? What do you 
> actually gain by doing this?
>

It's called encapsulation. It prevents namespace pollution and 
identifier collision. It also makes intelligent easier, not to 
mention looks nicer, keeps everything tidy, and everything else 
that makes coding easier.

If you think mentally changing a . to a _ is a hassle then your 
in trouble! An apple a day simply won't help!

I understand porting code won't be as easy but a simple WM_ to WM 
replacement would fix 99% of the problems. Oh well, some people 
just don't like progress! Do you want to go back to using wooden 
wheels too? Is that better because it's easier to understand than 
the complexity of vulcanized rubber and carbon steel?


>> Did you do a lot of win32 programming back in the day?
>
> Yup, and I still do. The documented names have worked for 
> twenty years, why change them now?

That's what I figured! Get out of the dark ages!




More information about the Digitalmars-d-learn mailing list