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]
Other format: [Raw text]

Re: Putting C++ code into gcc front end


Hi,

On 6 Mar 2003, Alexandre Oliva wrote:

> > In particular I would certainly
> > favor a rule forbidding the use of templates,
>
> This would be silly.

To this I agree.  templates in it's simpler forms are portable.

> It means you can't use iostreams, since they are templates.  You can't
> use strings either.  You can't use any of the *very* convenient
> features of the Standard Template Library.

But if the reason is, that we want to use the STL, I would be quite
strongly against that.  Using STL anywhere, even the simpler classes, has
a such huge impact on compile time, that it's not funny.  If we need a
list or map in the compiler I never would use the STL, and instead write
something simple by hand.  All the hooks and possibilities STL provides
make it extremely slow to compile.

> C++ without templates misses a lot of the benefits.  C++ without
> templates is kinda sorta a bit like C without pointers :-)

Well, yes.  But C++ without STL has only advantages except for throw away
programs, which have to be written fast (like in a programming contest ;-)
)

All IMHO.


Ciao,
Michael.


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