From: "Adam J. Richter" <adam@yggdrasil.com>
To: davem@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: 2.4.9 does not compile
Date: Thu, 16 Aug 2001 22:03:07 -0700 [thread overview]
Message-ID: <200108170503.WAA07234@baldur.yggdrasil.com> (raw)
The macro "min(n1,n2)", is a very standard practice in C
programming. Having a different version of "min" adds unnecessary
porting work and ifdef clutter when code is port between the kernel
and other uses (typically small mathematical calculations, data
structure manipulations, and data stream tranformations like
compression and encryption, such as in freeswan, which I had to
modify).
If a programmer wants to explicitly specify which type the
comparison converts to, then he or she can cast the arguments explicitly.
Programmers already have the opportunity "to think about it." Impeding
programming just to make programmers "think about it" rather than
treating their time as precious and letting them determine how to
invest it is rarely a winning trade-off, especially when you also
weigh the quality effects of increased code clutter and less programmer
time available for other improvements. To call this change Pascal-like
would be an insult to Pascal.
If you really want this facility, you could just declare
a distinct "typed_min" macro.
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
next reply other threads:[~2001-08-17 5:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-17 5:03 Adam J. Richter [this message]
2001-08-17 6:12 ` 2.4.9 does not compile David S. Miller
[not found] <no.id>
2001-08-17 8:58 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2001-08-17 6:52 Adam J. Richter
2001-08-16 21:11 f5ibh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200108170503.WAA07234@baldur.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).