3-rd party...

To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable
people to build on what others have done instead of starting over from
scratch. Appropriate functions can often hide details of operations from
parts of the program that don’t need to know about them, thus clarifying
the whole, and ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST
use C++ to develop maintainable, reusable and readable code is not
valid. You can not use C++ to make a bad programmer a good programmer.
On the contrary, putting C++ in the hands of a less sophisticated
programmer is asking for trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

K&R C reflects current wisdom in the age of top down structured programming.
You are quoting from text that is 23 years old. Perhaps there have been some
developments in software engineering since then that the crusty old C
compiler, designed based on the current wisdom circa 1978, is not the best
tool to use to implement?

I’ve recently said quite a few things I regret saying but I have never said
that you MUST use C++. On the contrary instead quite a few have stated that
one MUSTN"T use C++. My only point was and is, that if one tool is better at
X than another, and you are doing X, perhaps you should use the best tool.

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, October 31, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] 3-rd party…

To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable people
to build on what others have done instead of starting over from scratch.
Appropriate functions can often hide details of operations from parts of the
program that don’t need to know about them, thus clarifying the whole, and
ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST use
C++ to develop maintainable, reusable and readable code is not valid. You
can not use C++ to make a bad programmer a good programmer. On the contrary,
putting C++ in the hands of a less sophisticated programmer is asking for
trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com mailto:xxxxx


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx>

Message>good programmer. On the contrary, putting C++ in the hands of a less sophisticated

programmer is asking for trouble.

Yes, especially of the “programmer” has small practical experience, but large experience in reading metaphysical scholastic like
Grady Booch.

Give him C++ and you will have terrifying over-design, both in complexity and development time point of view. He would be the kind
of person who values following the abstract paradigm more then real-world performance, reliability or code readability.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Wisdom is wisdom … no matter how geriatric it may be. The quote still has
bearing and meaning, at least to me, so I guess I fail to see, Mark, how
your past or current comments point to its inappropriateness. Replace
“function” with “methods” or “objects” and it still applies, in a modern
context. As a matter of fact, I was doing that with assembly subroutines
before C had left B. (or was it BC … I dunno, I forget).

You re right … if X works best then use X … until the bean-counters see
the cost and then you will have to use Y. I wouldn’t recommend a company use
environments such as WinDk or C++ OO, because I don’t need them, nor do I
want them. I’ve already spent 5 years doing this the old-fashioned way — I
learned it.

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Wednesday, October 31, 2001 8:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

K&R C reflects current wisdom in the age of top down structured programming.
You are quoting from text that is 23 years old. Perhaps there have been some
developments in software engineering since then that the crusty old C
compiler, designed based on the current wisdom circa 1978, is not the best
tool to use to implement?

I’ve recently said quite a few things I regret saying but I have never said
that you MUST use C++. On the contrary instead quite a few have stated that
one MUSTN"T use C++. My only point was and is, that if one tool is better at
X than another, and you are doing X, perhaps you should use the best tool.
-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, October 31, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] 3-rd party…
To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable people
to build on what others have done instead of starting over from scratch.
Appropriate functions can often hide details of operations from parts of the
program that don’t need to know about them, thus clarifying the whole, and
ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST use
C++ to develop maintainable, reusable and readable code is not valid. You
can not use C++ to make a bad programmer a good programmer. On the contrary,
putting C++ in the hands of a less sophisticated programmer is asking for
trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com mailto:xxxxx


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:xxxxx>

If it works, don’t fix it.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Wednesday, October 31, 2001 8:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

K&R C reflects current wisdom in the age of top down structured
programming. You are quoting from text that is 23 years old. Perhaps
there have been some developments in software engineering since then
that the crusty old C compiler, designed based on the current wisdom
circa 1978, is not the best tool to use to implement?

I’ve recently said quite a few things I regret saying but I have never
said that you MUST use C++. On the contrary instead quite a few have
stated that one MUSTN"T use C++. My only point was and is, that if one
tool is better at X than another, and you are doing X, perhaps you
should use the best tool.

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, October 31, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] 3-rd party…

To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable
people to build on what others have done instead of starting over from
scratch. Appropriate functions can often hide details of operations from
parts of the program that don’t need to know about them, thus clarifying
the whole, and ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST
use C++ to develop maintainable, reusable and readable code is not
valid. You can not use C++ to make a bad programmer a good programmer.
On the contrary, putting C++ in the hands of a less sophisticated
programmer is asking for trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I guess we should burn Plato as well…

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Wednesday, October 31, 2001 8:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

K&R C reflects current wisdom in the age of top down structured
programming. You are quoting from text that is 23 years old. Perhaps
there have been some developments in software engineering since then
that the crusty old C compiler, designed based on the current wisdom
circa 1978, is not the best tool to use to implement?

I’ve recently said quite a few things I regret saying but I have never
said that you MUST use C++. On the contrary instead quite a few have
stated that one MUSTN"T use C++. My only point was and is, that if one
tool is better at X than another, and you are doing X, perhaps you
should use the best tool.

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, October 31, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] 3-rd party…

To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable
people to build on what others have done instead of starting over from
scratch. Appropriate functions can often hide details of operations from
parts of the program that don’t need to know about them, thus clarifying
the whole, and ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST
use C++ to develop maintainable, reusable and readable code is not
valid. You can not use C++ to make a bad programmer a good programmer.
On the contrary, putting C++ in the hands of a less sophisticated
programmer is asking for trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Max, we shouldn’t let the “less sophisticated” programmer write SMP code in kernel mode. Its much easier to train someone on
C++ then to have them actually comprehend multi-processors. And I’ve certainly seen ample
proof the those with “metaphysical scholastic like” training can royally screw up in C.

Since you can get most drivers write in C to compile with typically a few changes if you rename file.c to file.cpp, C++ in the
kernel does not need to be a major change. In fact, doing the former happens to make the browser in Visual Studio find
references to field names, without affecting the binaries generated.

So its difficult to argue that using the C++ compiler to compile C programs in kernel mode is bad, since the only significant
difference is that the browser works better.

So:
ALL OF THE DRIVERS YOU WRITE ARE WRITTEN IN A SUBSET OF C++.

And:
SINCE your drivers are written in a subset of C++, have you picked a reasonable subset?

One way to tell how committed you are to C only in the kernel is to consider your own view of
LARGE_INTEGER vs. ULONGLONG.

If you are a true “C only” believer, and you have a problem where you need to keep stats on events
that happen say 1,000,000 times per second, and you conclude that you need a 64 bit bucket, do
you declare it a “LARGE_INTEGER” and use the old obscure macro to add to it, or do you declare it
as ULONGLONG, and use the + operator, allowing the compiler to issue the multiple instructions
to complete the add on a 32 bit machine (or cheat and use LARGE_INTEGER::QuadPart)?

If you use “ULONGLONG”, you’re a “little pregnant”. You’ve accepted the fact that you’d rather
write code that’s easier to write and read, even if you don’t completely know the machine language cost.
As a compentent kernel coder, you know that assigning to a ULONGLONG is not atomic (at least on a 32 bit CPU) and that adding
ULONGLONGs takes more instructions than adding a ULONG.

So now say that you have a struct:

struct stats {
ULONGLONG reads;
ULONGLONG writes;

};

and variables

struct stats a,b,c;

Wouldn’t you like to be able to write, which is not obscure at all, and, as you did with ULONGLONG, even though you know this is
more expensive than a scaler subtraction
a = b - c;

rather than
StatsSub(a, b, c);

especially if the compiler can inline the former for you?

In summary:
Using C++ in the kernel does not require buying in to the fundamentalist OO religion.
Nor does it require you to use some package that wraps the IRPs in some new thing
so that you add another layer of code that arguably adds no value.

-DH

----- Original Message -----
From: “Maxim S. Shatskih”
To: “NT Developers Interest List”
Sent: Wednesday, October 31, 2001 12:25 PM
Subject: [ntdev] Re: 3-rd party…

> Message>good programmer. On the contrary, putting C++ in the hands of a less sophisticated
> >programmer is asking for trouble.
>
> Yes, especially of the “programmer” has small practical experience, but large experience in reading metaphysical scholastic
like
> Grady Booch.
>
> Give him C++ and you will have terrifying over-design, both in complexity and development time point of view. He would be the
kind
> of person who values following the abstract paradigm more then real-world performance, reliability or code readability.
>
> Max
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Burn Plato? Why? Because I suggested that there might have been a few
improvements in software engineering since 1978, I am somehow suggesting
we discard anything in K&R? Actually come to think of it, I cannot
remember the last time I picked up my dog-eared copy, so perhaps it
really isn’t of much value any more. It certainly does not describe even
the current C language, much less whatever it is that microsoft calls C.
Please go find __inline in K&R c1978, or // for that matter.

Did the development of philosophy stop because Plato said some things of
value? Should our reading in philosophy stop with Plato? Should we only
use those things designed around the wisdom of Plato? When a society
reaches that point it is considered to be stagnant. Like China after
Confucius, it can invent gunpowder and the compass and never manage to
put them to any real use, because it can’t allow anything to change.

I know, I’ll invent ridiculous arguments you never made, and you can
invent ridiculous arguments I never made, and we can each attack the
other’s strawmen. It is jolly fun, although it does get a bit tedious at
times.

Oh and by the way, having learned that some compiler monkey thinks that
pointers to functions are BAD I am in fact now converted to the one true
path and am forever more writing drivers in Pascal. Sheesh.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jamey Kirby
Sent: Wednesday, October 31, 2001 3:38 PM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

I guess we should burn Plato as well…

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Wednesday, October 31, 2001 8:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

K&R C reflects current wisdom in the age of top down structured
programming. You are quoting from text that is 23 years old. Perhaps
there have been some developments in software engineering since then
that the crusty old C compiler, designed based on the current wisdom
circa 1978, is not the best tool to use to implement?

I’ve recently said quite a few things I regret saying but I have never
said that you MUST use C++. On the contrary instead quite a few have
stated that one MUSTN"T use C++. My only point was and is, that if one
tool is better at X than another, and you are doing X, perhaps you
should use the best tool.

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, October 31, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] 3-rd party…

To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable
people to build on what others have done instead of starting over from
scratch. Appropriate functions can often hide details of operations from
parts of the program that don’t need to know about them, thus clarifying
the whole, and ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST
use C++ to develop maintainable, reusable and readable code is not
valid. You can not use C++ to make a bad programmer a good programmer.
On the contrary, putting C++ in the hands of a less sophisticated
programmer is asking for trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@hollistech.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

DANGER DANGER Will Robinson!!!

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dave Harvey
Sent: Wednesday, October 31, 2001 10:29 PM
To: NT Developers Interest List
Subject: [ntdev] Re: 3-rd party…

Max, we shouldn’t let the “less sophisticated” programmer write SMP code
in kernel mode. Its much easier to train someone on
C++ then to have them actually comprehend multi-processors. And I’ve
C++ certainly seen ample
proof the those with “metaphysical scholastic like” training can royally
screw up in C.

Since you can get most drivers write in C to compile with typically a
few changes if you rename file.c to file.cpp, C++ in the kernel does not
need to be a major change. In fact, doing the former happens to make
the browser in Visual Studio find references to field names, without
affecting the binaries generated.

So its difficult to argue that using the C++ compiler to compile C
programs in kernel mode is bad, since the only significant difference is
that the browser works better.

So:
ALL OF THE DRIVERS YOU WRITE ARE WRITTEN IN A SUBSET OF C++.

And:
SINCE your drivers are written in a subset of C++, have you picked a
reasonable subset?

One way to tell how committed you are to C only in the kernel is to
consider your own view of LARGE_INTEGER vs. ULONGLONG.

If you are a true “C only” believer, and you have a problem where you
need to keep stats on events that happen say 1,000,000 times per second,
and you conclude that you need a 64 bit bucket, do you declare it a
“LARGE_INTEGER” and use the old obscure macro to add to it, or do you
declare it as ULONGLONG, and use the + operator, allowing the compiler
to issue the multiple instructions to complete the add on a 32 bit
machine (or cheat and use LARGE_INTEGER::QuadPart)?

If you use “ULONGLONG”, you’re a “little pregnant”. You’ve accepted the
fact that you’d rather write code that’s easier to write and read, even
if you don’t completely know the machine language cost. As a compentent
kernel coder, you know that assigning to a ULONGLONG is not atomic (at
least on a 32 bit CPU) and that adding ULONGLONGs takes more
instructions than adding a ULONG.

So now say that you have a struct:

struct stats {
ULONGLONG reads;
ULONGLONG writes;

};

and variables

struct stats a,b,c;

Wouldn’t you like to be able to write, which is not obscure at all, and,
as you did with ULONGLONG, even though you know this is more expensive
than a scaler subtraction
a = b - c;

rather than
StatsSub(a, b, c);

especially if the compiler can inline the former for you?

In summary:
Using C++ in the kernel does not require buying in to the fundamentalist
OO religion. Nor does it require you to use some package that wraps the
IRPs in some new thing so that you add another layer of code that
arguably adds no value.

-DH

----- Original Message -----
From: “Maxim S. Shatskih”
To: “NT Developers Interest List”
Sent: Wednesday, October 31, 2001 12:25 PM
Subject: [ntdev] Re: 3-rd party…

> Message>good programmer. On the contrary, putting C++ in the hands of
> Message>a less sophisticated
> >programmer is asking for trouble.
>
> Yes, especially of the “programmer” has small practical experience,
> but large experience in reading metaphysical scholastic
like
> Grady Booch.
>
> Give him C++ and you will have terrifying over-design, both in
> complexity and development time point of view. He would be the
kind
> of person who values following the abstract paradigm more then
> real-world performance, reliability or code readability.
>
> Max
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com

> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

:)))

Ahhh… C’s pretty sister Pascal. I did her.

But for real. This has been a great thread. I think these occasional
“ice breakers” provide some constructive idle time. Lets do it again
sometime.

I am done.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Thursday, November 01, 2001 3:31 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

Burn Plato? Why? Because I suggested that there might have been a few
improvements in software engineering since 1978, I am somehow suggesting
we discard anything in K&R? Actually come to think of it, I cannot
remember the last time I picked up my dog-eared copy, so perhaps it
really isn’t of much value any more. It certainly does not describe even
the current C language, much less whatever it is that microsoft calls C.
Please go find __inline in K&R c1978, or // for that matter.

Did the development of philosophy stop because Plato said some things of
value? Should our reading in philosophy stop with Plato? Should we only
use those things designed around the wisdom of Plato? When a society
reaches that point it is considered to be stagnant. Like China after
Confucius, it can invent gunpowder and the compass and never manage to
put them to any real use, because it can’t allow anything to change.

I know, I’ll invent ridiculous arguments you never made, and you can
invent ridiculous arguments I never made, and we can each attack the
other’s strawmen. It is jolly fun, although it does get a bit tedious at
times.

Oh and by the way, having learned that some compiler monkey thinks that
pointers to functions are BAD I am in fact now converted to the one true
path and am forever more writing drivers in Pascal. Sheesh.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jamey Kirby
Sent: Wednesday, October 31, 2001 3:38 PM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

I guess we should burn Plato as well…

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Wednesday, October 31, 2001 8:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 3-rd party…

K&R C reflects current wisdom in the age of top down structured
programming. You are quoting from text that is 23 years old. Perhaps
there have been some developments in software engineering since then
that the crusty old C compiler, designed based on the current wisdom
circa 1978, is not the best tool to use to implement?

I’ve recently said quite a few things I regret saying but I have never
said that you MUST use C++. On the contrary instead quite a few have
stated that one MUSTN"T use C++. My only point was and is, that if one
tool is better at X than another, and you are doing X, perhaps you
should use the best tool.

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Wednesday, October 31, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] 3-rd party…

To quote Brian W. Kernighan and Dennis M. Ritchie:

“Functions break large computing tasks into smaller ones, and enable
people to build on what others have done instead of starting over from
scratch. Appropriate functions can often hide details of operations from
parts of the program that don’t need to know about them, thus clarifying
the whole, and ease the pain of making changes”

The C Programming Language (c) 1978 Bell Labs.
Page 65

This was written 12 years before Margaret A. Ellis and Bjarne Stroustrup
wrote The Annotated C++ Reference Manual. So, the argument that you MUST
use C++ to develop maintainable, reusable and readable code is not
valid. You can not use C++ to make a bad programmer a good programmer.
On the contrary, putting C++ in the hands of a less sophisticated
programmer is asking for trouble.

Jamey Kirby
StorageCraft, inc.
www.storagecraft.com http:</http:>
xxxxx@storagecraft.com


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@hollistech.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> to complete the add on a 32 bit machine (or cheat and use LARGE_INTEGER::QuadPart)?

Yes, I do this - if the variable must be passed to the kernel functions. Declare LARGE_INTEGER and use + and - on QuadPart.
Otherwise, I use LONGLONG.

least on a 32 bit CPU) and that adding
ULONGLONGs takes more instructions than adding a ULONG.

Surely, and a hidden function is called to divide them.
I can write RtlLargeIntegerAdd but prefer to use compiler support - the hidden semantics is minimal and predictable.

In summary:
Using C++ in the kernel does not require buying in to the fundamentalist OO religion.

Agree, then I do not object on C++ itself, only on fundamentalism mentioned.

“Strict” OO languages (Java is more or less such) are well ineffective in terms of memory use.
Also - do you know that in Java, string addition requires grabbing a mutex? It is done by synchronized method StingBuffer.Append().
This is a “hidden semantics” I mean. Even a well-written mutex requires locked opcodes, which ruin the CPU pipeline much more than
the string copy.

Also - “synchronized” keyword in Java is a deadlock country and suggests ugly programming style with doing large and compex stuff
under the lock.

Designing a complex C++ inheritance tree properly is more complex then more or less simple SMP/MT rules (ISR/DPC synchronization
and IRP cancellation being the 2 really complex things). And improperly designed tree will lead to all problems I have described.

Nor does it require you to use some package that wraps the IRPs in some new thing

Or CAsyncSocket.
Sockets are invented by Berkeley and not by MFC coders.
So, for me, CAsyncSocket is a kind of “toy” and Berkeley is a kind of “real”.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com