[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: es v*1* features



> the ability to specify a user-defined
> function that would be invoked on a history-file write 

we had kicked this one around, but unfortunately don't think it
will be in v1, for unfortunate reasons having nothing to do with
the shell's design and everything to do with current implementation.

	(a) the garbage collector can move memory
	(b) (a) -> ALL live references must be identified
	(c) we didn't write the yacc driver
	(d) we don't want to rewrite the yacc driver (yet)
	(e) (b+c+d) -> yacc code may have unidentified references
	(f) (e) -> garbage collection must be disabled while the parser runs
	(g) the parser calls the read routines
	(h) the read routines write the history file
	(i) (f+g+h) garbage collection must be disabled when we write the history file
	(j) any es function cannot be guaranteed to halt
	(k) (j) -> the garbage collector cannot be disabled when we run es code
	(l) (i+k) -> when we write the history file, we cannot run es code

now, none of this is cast in stone.  a reentrant parser, which includes
being able to collect while it's running, is on our task list for after
1.0.  it's also possible to move the history writing to a different
place in the code (e.g., after the parser has finished), but that required
potentially buffering a large amount of data.

anyway, we're thinking about it, and we agree with the desirability of
such a hook, but wanted you to understand why it ain't in there yet.