Re: [PATCH] [Request for inclusion] Filesystem in Userspace

Pekka Enberg
2004-11-16T11:20:57Z

Hi,

On Tue, 16 Nov 2004 12:01:06 +0100, Simon Braunschmidt
<braunschmidt@corscience.de> wrote:
> And redundancy does hurt maintainability.
>
> Naturally, it would be the other way around.
> Sure you can write all your code in binary, or even better compressed,
> but i wouldnt maintain those beasts ;-)

No, that is obfuscation and has nothing to do with this. The cast I
mentioned is _redudant_ because the common case is:

struct foo * f = (struct foo *) priv; /* priv is void pointer */

And the cast gives you absolutely zero benefit in terms of
readability. For arithmetic types, you use casts to be explicit about
different conversions, but for void pointers there's only one
conversion which makes sense and that's what the standard guarantees.

On Tue, 16 Nov 2004 12:01:06 +0100, Simon Braunschmidt
<braunschmidt@corscience.de> wrote:
> I vote for explicit casts, makes code more readable.

I vote for the established kernel coding style.

Pekka