Linux vs. libio
Kevin Atkinson
kevinatk@home.com
Mon Dec 20 12:09:00 GMT 1999
Per Bothner wrote:
> Duh. libio defines some *C++* classes, whose specification
> was (partially) specified by existing (de facto) standards.
> Using plain C misses the point. Libio was written to facilitate
> integration of C and C++ I/O, which is *required* by the C++ standard.
>
> There is (as always) a design tradeoff. As I see it,
> unified C/C++ I/O gives us:
> + Improved performance.
> + Conceptual elegance of uniting the I/O facilities of C/C++.
> + Easier mixing of C and C++ code (a GNU extension).
> + Sharing some tricky code (e.g. buffer management).
>
> On the other hand, it costs us:
> - Extra "hair".
> - Compatibility issues made more complicated when two ABIs
> depend so closely on each other.
Maybe I am missing something but couldn't the io code in linux be
written in pure C with a few extensions to allow C++ wrapper classes to
effectively use the io services. Like say provide inline functions (or
macros) to manipulate the buffer efficiently.
--
Kevin Atkinson
kevinatk@home.com
http://metalab.unc.edu/kevina/
More information about the Libc-alpha
mailing list