Messages in this thread |  | | From | "Adam J. Richter" <> | Date | Thu, 16 Aug 2001 22:03:07 -0700 | Subject | Re: 2.4.9 does not compile |
| |
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." - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |