[Gllug] C++ Templates, Opinions?
Richard Jones
rich at furbychan.annexia.org
Fri Dec 31 16:09:53 UTC 2004
On Sat, Dec 25, 2004 at 12:12:25AM +0000, Nix wrote:
> [...] and [refcounting] 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.
It's an overhead on every pointer copy, eg. pointer assignments, and
whenever a pointer goes out of scope. In other words, a big time
overhead.
> 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).
I agree that the C++ community has done marvellous things with the
language. The problem is that you wouldn't need all these hacks if
you had a language which was designed properly in the first place.
Have a look at OCaml ... really ... (http://caml.inria.fr) It's as
fast or faster than C++ in almost all cases, and your lines of code
will be an order of magnitude smaller. Or have a look at Haskell,
or SML/NJ, or Common Lisp.
Rich.
--
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list