lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 1/1] consolidate TRUE and FALSE
    On Thu, Mar 16, 2006 at 04:30:01PM +0000, Christoph Hellwig wrote:

    > it makes the code longer and harder to read. there's a reason the core
    > code doesn't use it, and the periphal code should do the same.
    Let see:
    0 is an interger zero. It is not a null pointer.
    1 is an interger one
    NULL is an null pointer

    We agree so far?

    And you say:
    0 is also false
    1 is also true

    But others say:
    0 is not false, only false is false.
    1 is not true, only true is true.
    Thats more readable. No magic = 1; assignments or return 1; things.

    Then we will have the case where a 1 is transformed to a true, and
    likewise a 0 to a false. But thats just normal type conversion.

    I assume that when you are not used to see 'bool', 'true' and 'false'
    then they hurt the eye, but when used to it it looks natural.

    Sam
    -
    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/

    \
     
     \ /
      Last update: 2006-03-16 18:44    [W:0.019 / U:57.636 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site