Re: Larry Wall, on Tcl



Oscar Fuentes <ofv@xxxxxxxxxx> wrote:

A GC system just manages
memory. This relieves the programmer of one nasty task, namely,
releasing data objects that are no longer needed.

If that's what GC means, then Tcl already has it. Every "data object"
in Tcl is a string. As soon as a variable goes out of scope, or if a
variable's value is modified to require a different amount of memory,
the Tcl interpreter releases the memory originally used. The garbage
collection is immediate, perfect, and unassailable.

But if that's all GC means, it seems rather a trivial thing to get all
worked up over. The label "garbage collection" to me implies something
a lot more involved than simply reclaiming the memory used by unneeded
data. I thought the whole point of GC was to determine *when* data
objects are no longer needed, so that they can be released without
explicit action by the programmer.

Another major advantage of GC is that it makes natural certain
programming practices, such as Functional Programming, with its
closures, functors, etc. and attaching data context to code in
general. This is a very important "feature" of GC.

I'll admit to being mostly ignorant on the fine points of FP. My
partially informed impression is that data is temporary, and doesn't
stick around when it's not needed. I'd imagine GC in such a case is
also immediate, and thus barely qualifies as GC the way I thought of it.
.



Relevant Pages

  • Re: C++ sucks for games
    ... > mistakes it is possible for a programmer to make (although of course memory ... > references and memory management is a bit of a red herring here. ... you would use smart pointers too. ...
    (comp.lang.lisp)
  • Re: ASTs in assembler
    ... Absolutely I don't mean optimizing what has written by the programmer. ... idea of the assembler being able to have a "big picture" of the source. ... Because of the amount of memory modern machines have, ... Why not read macro bodies from macro symbol table? ...
    (alt.lang.asm)
  • Re: Garbage collection
    ... and that the allocations retained ... programmer to avoid bugs in MANUALLY done memory management? ... allocated memory, no recursion, and the maximum call depth and memory ...
    (comp.lang.c)
  • Re: A Silly Database Question
    ... I guess it's easy to see why it's always a can or a cylinder. ... The use of multiple platters was an attempt to increase the probability that more 'record's would be 'found'/accessed by a single head seek. ... I had one boss who said if he read one more resume of a system programmer who had invented a new VTOC manipulation program, ... They didn't want to use the generic subroutines for disk access provided by IBM which had memory sizes of thousands of bytes because they were short of 'main memmory' and it was too expensive to bump their main memory from 16Kilo-bytes. ...
    (comp.databases)
  • Re: GC performance - GC fragility
    ... Which means an access delay you cannot predict and have no control over, ... I free some memory. ... to interact with it directly. ... It an attempt to take the systems programmer out of applications ...
    (borland.public.delphi.non-technical)