On Sun, 30 Dec 2012 14:13:59 -0500
Toby Thain <toby at telegraphics.com.au> wrote:
Of course, I didn't imply that *every* program
should use garbage
collection.
Sure. But there are languages that don't leave this decision to
the
programmer. C++ does.
(Though you might be interested in some of the
research into
Scheme systems in tiny microcontrollers...)
Scheme is new to me. But I know of
Java, JavaScript and Lua
implementations, all garbage collected, for micorcontolers. Though,
most of them are to big for many 8-bitters.
I was referring to higher level languages which are
appropriate for
business/web/general problems.
\begin{advocatus diaboli}
So C++ is no higher level language and is not appropriate for general
problems? ;-)
\end{advocatus diaboli}
The existence of full garbage collection
can offer many first order and higher order benefits there (for example,
imagine managing object lifetimes given non trivial use of closures and
closure environments).
I use closures / lambdas in C++11 extensively - without
garbage
collection and without memory management problems. I just use simple
RAII to manage memory, i.e. "smart pointers". Though, you can call
smart pointers a primitive and crude way of garbage collection. ;-)
--
\end{Jochen}
\ref{http://www.unixag-kl.fh-kl.de/~jkunz/}