Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2002-10-24 00:05:04

"Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
> "Edward Diener" <eddielee_at_[hidden]> wrote in message
> news:ap7i2b$d9v$
> > Regex++ is a library. It is a single DLL or LIB file and not just a set
> > template header files.
> Why?

Why what ? That it is partly a library or that it is a single library ?
Surely you know why people create re-usable libraries.

I would suggest that you ask Dr. John Maddock who wrote it further about its
design. I am not the designer although I have used it successfully in my own
Regular Expression Component Library ( . Much of the
underlying Regex++ functionality exists in a library because instantiating
such code via templates each and every time would really lead to code bloat.
At least a library allows one to fold common code together.

> > That may explain what you believe to be code bloat
> > somewhat. I realize that using the LIB file should result in the final
> > module only including the object files needed but many of the object
> > contain a large subset of functionality within a generalized source
> so
> > very possibly even using the static LIB version drags in some extra
> unneeded
> > code.
> Would that hint that an alternative approach would be better?
> > > > That said, I think GRETA is about as big as regex++.
> > >
> > > The hundreds of KB still put both libraries in the hugely expensive
> range.
> > > At 500 KB, it would frankly border on unacceptability for many real
> > > projects.
> >
> > Wow ! I always thought 500 KB was pretty small in these days of
> > multi-megabyte modules and executables and gigabytes of memory and
> > memory. You must be working on some pretty small projects, Andrei !
> Thanks for the implied compliment. Ok, let's take a look:

Didn't mean it as a compliment or putdown, but just as a straightforward

> cvs.exe: 239 KB
> efaxview.exe (fax viewer): 337 KB
> kazaa.exe: 2,258 KB
> msmsgs.exe (MS Messenger): 1,477 KB
> stocks.exe (Medved QuoteTracker): 4,642 KB
> wincvs.exe: 733 KB
> I believe I compressed some or all of these programs with upx, but if you
> double the numbers, my point stays the same.
> Consider a 3 MB executable, would that be enough? If what my program does
> ***all about*** regular expressions, ok, I grudgingly agree on having a
> regex engine add 17% size to it.
> If that program has only incidental use for regular expressions (as might
> the case with either of the above programs), such as validating some user
> input or parsing some protocol or parsing some file format, then no way
> we're talking about "pretty small". No way.

I guess I don't understand the issue regarding size per se. Unless one is
programming embedded systems nowadays it practically doesn't seem to matter.
Of course I understand designing something well so that extraneous code or
code duplication doesn't occur, and I enjoy as much as the next programmer
designing something elegant, creative, and beautiful. But just as in a more
well known area, size matters much less than people think and creativity is
what counts.

Boost list run by bdawes at, gregod at, cpdaniel at, john at