[Gllug] C++ Templates, Opinions?

Nix nix at esperi.org.uk
Sat Dec 25 00:12:25 UTC 2004


On Mon, 20 Dec 2004, Richard Jones uttered the following:
> On Sun, Dec 19, 2004 at 11:44:26PM +0000, Nix wrote:
>> >                                       or regular expressions, or
>> 
>> See Boost.
> 
> Ah yes ...
[snip regex template delcaratons]
> It's so simple when you know how :-)

C++'s declaration syntax is ridiculously wordy in some respects,
agreed. I certainly don't think C++ is anywhere near perfect :)

> $str =~ /regex/;
> 
> Boost's garbage collection seems to be based on reference counting (am
> I right in saying this?)  Refcounting isn't really garbage collection

Agreed.

> at all, and it imposes a serious overhead in both space and time.  One

Disagreed. It's a space overhead, but only a time overhead if
allocations are very frequent.


The problem with providing non-refcounted GC in Boost is that such is
necessarily compiler- or platform-specific, which Boost may have no
truck with (being as it is a test platform for the next C++ standards
revision).

Nonetheless, work is ongoing to add hooks so you can plug in other GC
engines, like Boehm's, or maybe even a type-accurate one (the mudflap
infrastructure in GCC 4.0 might serve as the nucleus of such a
GC... hm...)

-- 
`The sword we forged has turned upon us
 Only now, at the end of all things do we see
 The lamp-bearer dies; only the lamp burns on.'
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list