Bruno Haible <[EMAIL PROTECTED]> writes:

>      The less you have to think when manipulating some code, the better.

True, but there are other concerns.  When I read C code like this:

      (char *) <expression>

I stop mentally and ask "why is that cast there?"  Casts like that are
dangerous, and I need to check them by hand, since the compiler won't
help me.  So I prefer to avoid casts when that is easy, as is the case
here.  This improves the quality of the compile-time checking and
makes the code shorter and easier to read.

I guess it partly depends on whether one prefers code to be easy to
read, or easy to write.  I usually prefer the former.

The C++ issue is another story.  I used to worry about porting to C++,
but I find that less and less of an issue, partly because there is so
much code that simply won't work with C++ (e.g., code derived from
glibc).


Reply via email to