nickgillian / grt

gesture recognition toolkit
861 stars 284 forks source link

Support saving and loading of class names. #64

Open damellis opened 8 years ago

damellis commented 8 years ago

e.g. https://github.com/damellis/grt/commit/4177f2a082b386878b765d449c40806efdbd4877

I'm assuming this isn't so straightforward though, as I think adding new fields will probably break loading of new files by older versions of the GRT. Do you have a preferred approach to this kind of change?

codeflakes0 commented 7 years ago

I've done it for my own use. I could clean it up and upload it. It's possible to be retro compatible by checking if the class name is available or not. If not class name will be arbitrary like "Class1"

damellis commented 7 years ago

@codeflakes0 I think there's a problem with backwards compatibility in the other direction: loading new files with an older version of the code. I believe the current code will break if it encounters an additional, unknown field in the file.

codeflakes0 commented 7 years ago

I think you mean forward compatibility but I'm never sure which is which. That is true the new version with class name support will be able to load old files but the old code won't be able to load new files. But that's how software progress, I don't feel this to be a problem for a dev/research work in progress like GRT.