Actually, there were a large number of OS’es that were developing new
components in C and which had done this long before Cutler did it to annoy
you. Part of the reasoning behind the types was that the companies doing it
had 16 and 32 bit systems, and people hated C when they found that the size
of int changed depending on the system. Another reason this was commonly
done was that we were writing code that communicated from one system to
another, it was better to have one ULONG32 type that you knew was 32-bits
always than having to worry what the compiler guys choose.
As I stated in my earlier post, there was actually a lot of this being done
in some of the earliest Unix ports, since the original Unix code was pretty
hard coded to a PDP-11 (i.e. 16-bit, byte addressing and little endian).
Having been drafted in the mid-70’s to help on some of these ports, you get
a very different view of Unix than those who came along say 8 to 10 years
later when Unix was considered the great portable OS (and even then had a
ton of warts).
There were multiple books and articles on writing portable C code back in
the late 70’s early 80’s since this was considered a black art, and
consultants made a ton going in and fixing attempts of some firms.
Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Tuesday, May 05, 2015 11:26 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] convert LARGE_INTEGER to DWORD
Well, I am afraid the only people in the world who can explain it to you are
the ones who had actually invented the above “masterpieces”.The only thing
left to us is to speculate about it.
If you asked me about it, my suggestion would be pretty much the same as
the one that I had made earlier on this thread.
Don’t forget that C and UNIX are closely related. Apparently, the inventors
of the above “masterpieces” would have preferred to write their kernel in
some language other than C, but writing a compiler and a new language was,
apparently, considered to be a bit to the extreme. After all, it would
require quite a bit of extra resources, so that NT architects would have to
justify it somehow. Lets face it - if you are asked why C is unfit for the
purpose of designing a kernel, saying " just because C is closely related to
UNIX, and I hate UNIX" would hardly provide a viable justification for
hiring a compiler team. Therefore, they had to do it in C.
In order to alleviate the pain that they had to endure, they decided to make
it look as C-unlike as possible. To be honest, I just don’t see any other
explanation as to why someone may want to rename all internal C datatypes.
Concerning the choice of names, I guess they chose these names simply to
make the whole thing as programmer-unfriendly as possible, effectively
ensuring that “By programmers, for programmers”
principle definitely does not apply to their “creation”. To be honest, I
just don’t see any other explanation as to why someone may want to chose
something as ridiculous as “typedef unsigned __int64 DWORDLONG;”
Concerning the actual style, I guess they chose it because they wanted to
make Windows programming particularly enjoyable to those folks who prefer to
have CapsLock key on 90% of the time. If you read NTDEV on regular basis you
must that these folks tend to be “MSFT aficinados”…
Anton Bassov
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer