lkml.org 
[lkml]   [2002]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: C++ and the kernel
    From
    Date
    commence  Chris Friesen quotation:

    > "Richard B. Johnson" wrote:
    >> Making code "cleaner" is a matter of perspective.
    >>
    >> class A {
    >> public: void func(char *st) { cout << st << endl; }
    >> };
    >> using A::func;
    >> A a;
    >> a.func("Hello World!");
    >>
    >> Is not all that clean. In fact, I'm not sure I have it right. It's
    >> easier and clearer to write puts("Hello World!");
    >
    > Your example is needlessly complex, and I'm sure you know this. A more
    > realistic comparison would be:
    >
    > cout << "Hello World!\n";

    And of course standard libraries are not available in the kernel, so
    you'll most likely end up calling printk anyway in your C++ kernel
    code.

    --
    ///////////////// | | The spark of a pin
    <sneakums@zork.net> | (require 'gnu) | dropping, falling feather-like.
    \\\\\\\\\\\\\\\\\ | | There is too much noise.
    -
    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: 2005-03-22 13:25    [W:3.186 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site