>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje> Martin Buchholz <martin(a)xemacs.org> writes:
> The biggest problem with lstreams is possible garbage-collection
> overhead.
Hrvoje> Why? If lstreams are properly managed in frob blocks, shouldn't their
Hrvoje> "allocation" and "deallocation" be a very cheap operation?
It's not so much that deallocation isn't cheap, but that
garbage-collection needs to search all of memory. So Lisp allocation
(``consing'') of any kind is expensive, and the more lisp objects you
have, the more expensive the next gc becomes.
What we really want is a modern generational garbage collector (what
Java's Hotspot calls an `object nursery') but implementing this in
XEmacs is HARD.
> Someone should study java and common lisp streams, and then
> implement exposing lstreams to lisp code in a similar fashion.
Hrvoje> Java and CL streams are a part of the interface, while lstreams are
Hrvoje> more of an implementation helper, aimed at simplifying XEmacs C base.
Hrvoje> It's quite reasonable that they differ from whatever Java and CL have.
I'm suggesting that lstreams perhaps should be more than just an
implementation helper, and be available to lisp code for the same
reasons that Java makes them available to Java code.
Martin