in reply to Restoring a Data Structure from a File

Having been down this road before, I'd advise you to save, and verify data VERSION information.

In other words, make sure the VERSION of the data, and the program structure the data imports into are compatible.

This is critical to feature-creep applications. Also have suitable defaults for each feature you add, so older stored data can remain compatible.

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

  • Comment on Re: Restoring a Data Structure from a File

Replies are listed 'Best First'.
Re^2: Restoring a Data Structure from a File
by cmv (Chaplain) on Nov 03, 2007 at 03:14 UTC
    NetWallah This is an excellent suggestion, which I will be adding to my code as soon as possible. I've already been tripped up with data version problems in some other code I've written, but never thought to do anything about it. Many thanks for the suggestion!

    -Craig