This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: again OOPS and linux


Vineet Sharma <mail2viny@yahoo.co.in> writes:

>           Lot of helpfull replies, but for those who
> had concern about disclaimer, here i post it again.For
> them to respond.

Thanks for doing this.

> 1) When all other software be it any application etc
> are moving to
> OOPS(object oriented) approach. Then why is it that
> OOPS has not been tried
> on compiler and other tool chain development(specially
> for linux)?
>  
>     * Is there any technical issue?
>     * Or simply no one ever dared to try it?

As others have said, BFD is written using object oriented programming
techniques, so it is not correct to say that the tool chain does not
use OOPS.  In fact, in some ways BFD would be easier to understand if
it were written in C++.  The _bfd structure is really a virtual class.
All uses of BFD_SEND are really implementations of virtual functions.

That said, it is clearly an exaggeration to say that "all other
software" is moving to an object oriented approach.  If you mean that
software is increasingly written in C++ and Java, then you are
probably correct, but that is not at all the same as using an object
oriented approach.  It is easy to write C++ code in particular without
being object oriented, as C++ supports many programming styles.

> 2) Is OOPs really has its advantage in compilers and
> tool chain development?

In some cases, sure.  Objects are a programming technique like any
other.  Sometimes they are appropriate, sometimes they are not.

> 3) Any suggestion or points that are important to be
> considered before
> seriously thinging about an pure object oriented
> compiler (for c,c++ on
> linux?

C compilers are universal.  C++ compilers are not.  Therefore, the GNU
binutils will continue to be written in C for the foreseeable future.

Ian


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