This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Linux vs. libio


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]