3 ms·
Use hashtable for everything. So Person who has a name address age and occupation is represented as a hashtable with those fields. When you want to add a new fi
by vikram 19y ago
Use hashtable for everything. So Person who has a name address age and occupation is represented as a hashtable with those fields. When you want to add a new field like emailaddress it's just another key in the hashtable.
Ideally you want to code the person accessors so that they still specific externally
person-name
person-age
the rest of the program uses these so it becomes easy to move person to a different structure if that's what you want .
You want to write some function to read a hash-table and write on to disc. In lisp this is trivial, but most languages have some sort of serializer. Then a function to load all the hash tables up when you start up.