In a msg on <Aug 22 01:36>, Walter Bright of 42:1000/2 writes:
-> /MRESULT EXPENTRY ClientWndProc (
-> / HWND hwnd,
-> / USHORT msg,
-> ^^^^^^
-> / MPARAM mp1,
-> / MPARAM mp2)
-> I've never understood this strange urge to #define the basic
-> types. Is anyone out there using a compiler where USHORT
-> would be anything other than "unsigned short"? How about SHORT
-> being anything other than short, or LONG being anything other
-> than long?
I guess I agree, mostly, but I do find it useful in that it takes less typing and 'fits in' with the general appearance of the rest of the types - they are all upper case...this is, I recognize, a personal asthetic kind of thing and comes from habit and indoctrination and no sound technical reason in this case.
-> They remind me of the old practice (now discredited, after being
-> discovered to be useless) of:
-> #define BEGIN {
-> #define END }
This is just plain silly. If someone wants BEGIN...END in their code, use Pascal...
-> These silly typedefs create a useless layer of obfuscation and
-> another potential source of error (I always have to check if
-> SHORT really was short!)
Is this really a factor? I've only ever had to do this when IBM or MS released a new version of their toolkits... ;-)
-> Another brain-dead one is:
-> #define FAR far
-> The argument I hear is that on systems without far, you can just
-> do: #define FAR
-> and it goes away! True, but why cannot one do:
-> #define far
-> and achieve just as much portability?
-> (P.S. I have running code that compiles and runs on 16 bit DOS,
-> 32 bit DOS, 16 and 32 bit OS/2, Windows, Windows NT and 68000
-> Macintoshes. Never have I needed those aliases for the basic
-> types.)
Agreed. Again, it is just a matter of asthetics for the simple types, IMNSHO.
Regards,
Barry
* Origin: The OS/2 Connection - Edmonton, Alberta, Canada (42:100/31)