Re: Why We Should Use the STL (fwd)


Subject: Re: Why We Should Use the STL (fwd)
From: sam th (sam@uchicago.edu)
Date: Sun Jun 04 2000 - 12:47:46 CDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 4 Jun 2000, Aaron Lehmann wrote:

> Well, I'm pleasently suprized that an AbiWord developer would even suggest
> such a contraversial change.
>
> I agree 100%. Speed is very important, even in desktop programs. It is
> pointless to slow down some parts of the program by 23 times just because
> of a fear of templates.
>
> Another issue I would like to raise is standards. The point of STL is
> having a standard so that applications do not have to implement their own,
> mediocre, simple types. This is what AbiWord has done. By all means,
> AbiWord should use the standard, not only for speed, but so that C++
> developers don't have to learn yet another type library. Using STL would
> mean that we wouldn't have to maintain or support the UT_* classes,
> because they would be replaced by faster, better, more standard
> equivilents.
>
> I really hope this doesn't get vetoed by the luddites ( :) ) on this list.
> Now, who's going to write this huge patch? ;-)
>
> Aaron Lehmann
>

Well, it's good to know people agree with me.

Fortunately, the patch is not that huge. We would just have to make our
current UT_Vector implementatation be a wrapper for the STL vector<>. We
don't duplicate that many types from the STL, really only stack, hash and
vector (I don't know if the STL provides bytebuf, but I don't think
it does). We can't replace string, since STL doesn't support Unicode the
way we do.

Now I realize that this is unlikely to be neccessary for getting 1.0 out,
but the speed will be nice, and I should have UT_Vector hacked this week.
           
                                     sam th
                                     sam@uchicago.edu
                                http://sam.rh.uchicago.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5OpZDt+kM0Mq9M/wRAjjcAJ4/xFP9WXEZAA5hxo0rHL4pySa4ZQCeJqHJ
ThAtM6Ah+PXXqsrpN5w8FYA=
=MkuN
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b25 : Sun Jun 04 2000 - 12:49:39 CDT