When will Java go mainstream like Python?

Ben Finney ben+python at benfinney.id.au
Thu Feb 25 02:31:46 CET 2010

Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> writes:

> [Reference counting] avoids the need for garbage collection. It means
> I can write things like
>     contents = open(filename, "r").read()
> and know the file object will be immediately closed after its contents
> are returned.

Not quite; it means you know that the object *becomes a candidate* for
cleanup immediately after its contents are returned.

When, or whether, that cleanup actually happens is not something that is
necessarily promised by a reference-counting implementation.

 \      “I tell you the truth: some standing here will not taste death |
  `\     before they see the Son of Man coming in his kingdom.” —Jesus |
_o__)                     Christ, c. 30 CE, as quoted in Matthew 16:28 |
Ben Finney

More information about the Python-list mailing list