|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-05-06 09:32:58
jcampbell3_at_[hidden] wrote:
> If you changed the collector to use smart pointers, then you
> could use the method in
> http://groups.yahoo.com/group/boost/files
> /GarbageCollectByTmplSpecializa/
> for collecting cycles. What are the reasons for not using smart
> pointers?
First, this is invasive.
Secondly, it adds complexity. Simple is good.
I read the description in the above file,
and I don't have the faintest idea what it is on about.
I'm not sure how to use it, what it does, what compilers
it works on, what the costs are, etc. Note that at
present, the Felix gc depends ONLY on the C and C++ standard
libraries: it doesn't depend on boost.
[It would be nice if someone could explain and demonstrate
use of the above file, it may well be useful.]
Thirdly, the collector was originally designed for Felix.
Felix has no problems generating the shape objects. It is possible
a tool can help C++ programmers generate the shape objects,
and it is possible that the amount of work is too much for some.
I'm not sure.
Finally: I am about to release a replacement collector
which also does reference counting. Again, the implementation
works with _ordinary_ pointers.
I have a 'general' comment here: making things 'easy to use'
in C++ can only go so far. The language is too weak. In designing
components, therefore, I tend to concentrate on efficiency and
functionality: making it easier to generate C++ mechanically is probably
more important than making it easy to write, since it is never
going to be easy to write. It's a lot easier to design a new language
that _is_ easy to write, and translate to C++, than to push a whole
lot of C++ features that are supposed to 'help' the programmer,
but more often than not just get in the way.
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk