DesJardin's argument is finely crafted, but does this support it? Is min3
intended to be what Linus was talking about? I usually use m4 when I need
conditionals in macros, and I don't use C conditional statements much, but
isn't what Linus was saying simply something like...
#define min(type,a,b) (type) a < (type) b ? (type) a : (type) b ;
Looking at the trade-offs should account for the simplicity. Even if my
code is wrong, it's about reflective of the required complexity, y/n?
The simple form doesn't catch things. That's OK for a default. Maybe
that's what you want. If it's simple you know what you have, regardless.
"programmer error" is frequently a sign of compiler mis-design.
One reason I'm speaking in support of Linus on this one is that there's
something oddly Forth-like to a simple min(type,a,b). No coder nowhere
knows simplicity like Chuck Moore. Linux is ripe for a bit of that. The
other thing about the 3-arg min thing is that it's rather original, and it
amuses me to see Linus get disrespected for a quantum of real creativity
in his own forum. Linux is also ripe for a bit of free thinking. What's
open source for if all it helps is closed minds?
Rick Hohensee
www.
cLIeNUX
.com
humbubba@smart.net
-
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/