octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem loading/saving of lists and structures.


From: John W. Eaton
Subject: Problem loading/saving of lists and structures.
Date: Tue, 14 Mar 2000 17:04:35 -0600 (CST)

On 12-Mar-2000, Joao Cardoso <address@hidden> wrote:

| Octave is start having problems with the save and load of list and
| structures in its development versions (2.1.xx).
| 
| Up to now, at least three versions exist for this purpose in the
| octave-sources mailing lists. Also, boolean variables can't be saved,
| but no patch for it exists (yet :-).
| 
| I am using my version since Octave version 2.1.12, and use it everyday
| for loading and saving 'datasets', which consists of structures and
| lists. Perhaps I should do it using the HDF5 format, but now it is too
| late. To avoid future incompatibilities between packages and our own
| script files, I think that this question must be addressed, please.

I agree, and I could just apply the patches and clean up whatever
conflicts arise, but I'd like to try to do something better, if it is
possible.

Here is the problem as I see it.  Since Octave allows users to add new
data types, it would be nice if those data types could be included in
files created by save and then also loaded by the load function.  That
would be easy to do if Octave had just one (or even several) data
formats.  We would just require that anyone deriving a new
octave_value object define a function (or several functions) to handle
saving and loading the new data type.  But people also want to
overload the load and save functions to read and write their own data
file formats.  I don't see how someone adding a new data type can
anticipate all the data formats, nor do I see how someone writing code
to handle new data formats can anticipate all new data types that
someone else might add.

Do you see any reasonable solution for this problem?

Perhaps overloading the load and save functions is not a good idea?

Would it be unreasonable to expect people to use some other functions
to read and write files in the Matlab, HDF, or other formats?

Thanks,

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]