[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 19 19:38:36 1994 
Subject:define 
From:jlc (Jonathan Cunningham) 
Volume-ID:940119.09 

> | > Actually, the most evil of Pop11 constructs is -valof-.  However, that
> |
> | I like using valof to postpone autoloading till needed, e.g. mapping
> | a VED key sequence to the name of a procedure rather than the procedure,
> | or writing code of the form
> |   valof("foo")(x,y,z)
> 
>     define foo( x, y, z ) as load( 'foo.p' ); foo( x, y, z ) enddefine;
>     ... foo( x, y, z ) ...
> 
> Steve can write the syntax word :-)
> 
I once had a syntax word -tempdefine-, which effectively did this but
also used temporary properties so that after a few garbage collections
the -foo- would get unloaded again. I can't remember how it worked now,
but it would be easy enough to reimplement using destroy actions. (Don't
see HELP * DESTROY - there isn't one, you need to look in REF * PROPS.)

I never used -tempdefine- for anything real: I was experimenting with the
concept on a machine which didn't have virtual memory (yes, you guessed
it, in Alphapop). But if you guys (that's a modern dialect sense of "guy"
and includes both (all?) sexes) want/need to save virtual memory maybe
you should consider writing it.

As part of the specification for a -tempdefine- (and please mail me a copy
when you've written it :-), please note that the number of GCs required
before a definition is unloaded should be specific to each definition,
should increase each time the function is reloaded, and should decay
gradually during GCs when the function is not in memory.

Regards,
Jonathan