Re: [PATCH] remove some usesless casts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip,

Jörn Engel wrote:
> > Your definition of _unnecessary_ casts may differ from mine.
> > Basically, every cast is unnecessary, except for maybe one or two - if
> > that many.

On 4/20/05, Phillip Lougher <[email protected]> wrote:
> Well we agree to differ then.  In my experience casts are sometimes
> necessary, and are often less clumsy than the alternatives (such as
> unions).  This is probably a generational thing, the fashion today is to
> make languages much more strongly typechecked than before.

I think Jörn means that if you need an opaque data type, use void
pointers (which are automatically cast to the proper type) and that
all other casts are a design smell (except for the one or two special
cases where you actually need them).

                                 Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux