>Concerning dean's remark: If you add or delete the dependency on one
>system function, you need all platforms to be extended. By looking at
>two header files for solaris and linux, I found that the same headers
>are included at different positions. This looks more like a maintainence
>pain than a few ifdefs, or just some defines in the makefile.
>But then, I am not the maintainer:-)

Sometimes conditional code is ok, but mostly its a death trap. The problem
is that I make a change to the code, and compile and test it. And it works
fine and I put it in. Then you try it, but because I wasn't able to confirm
the code that was not included for me, it broke you. Then you fix yours,
but you can't test mine so that breaks me.

Even if I can build and test each version myself, I have to do X builds and
tests to confirm my changes before I can put it back. If, during one of
those builds, I find something broken on one of the targets and have to fix
that, I have to confirm again that all of the platforms build and work
correctly.

In the end, complexity is the software killer, to be avoided at almost all
costs, IMHO. A moderate amount of redundant code is simple to deal with
compared to a moderate amount of conditional code, in most cases. Only when
its used like we use it in the per-compiler and per-platform headers (i.e.
it just drives types and some basic capabilities) does its power exceed its
danger, again IMHO. Given that there are only about what, 4 Unix based
per-platform files, my guess is that it isn't worth it.

But, as I said, me just know Windows and XML, so if the folks who do the
Unix platform files think its worth it, I say have at it. I've offered my
real danged sage advice, and that's all I really wanted to do.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]



Reply via email to