Kerry Brown 发表于 2022-7-6 11:26:12

 
Personally I don't like seperated key and value lists .. too error prone and problematic to debug

BIGAL 发表于 2022-7-6 11:31:12

My five cents worth all the above are good ideas but I would make what your trying to do 2 defuns (newvars) & (oldvars)you will probably find that you want to do this same thing in lots of your code. Just put the defuns into a master lisp that loads at startup then each new program you only need to (newvars) at end (oldvars)
 
I have a particular suite of 92 lisps and use this method all the time and then there are no mistakes and scratching of head as to why something doesn't work or went on the wrong layer (have a external customisable layer system) a particular area is "units" there are multiple setvars sometimes to be changed.

Kerry Brown 发表于 2022-7-6 11:36:19

Yep, that works fine untill you need to address a couple or 6 variables that you don't usually worry about ... and to handle their restoration at completion/error.
 
I don't see anything wrongor incorrect with the OP's intention.
页: 1 [2]
查看完整版本: Not difficult (if you know how