Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Disk-based or db-based associative array -- good or bad?



William Park wrote:
> I just wanted to ask shell experts here.  Is disk-based associative
> array a good thing to have for a shell?  That is, reading and writing
> like normal in-memory array, ie
>     typeset -A var
>     var[aa]='bb'
>     echo ${var[aa]}
> except that 'aa':'bb' key:value will be written to and read from db file
> (either Gdbm or Berkeley BD) on disk.

As an add-on module this would be a very good thing to have.  It would
fit in well with existing modules such as zsh/parameter and zsh/mapfile.

One problem at present is we don't have a way of associating a parameter
with a particular implementation.  I think something from ksh93 would do
this.  Otherwise we can define some `tie'-like syntax for typeset.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author