pre-srfi / package-scm

The package.scm file format
MIT License
1 stars 1 forks source link

Should there be a metadata version? #5

Open diamond-lizard opened 3 years ago

diamond-lizard commented 3 years ago

If there was a metadata version then we would leave open the possibility of upgrading/fixing the format in the future, instead of having it set in stone for all time. Implementers could also be sure of which version of the format they're generating and parsing.

lassik commented 3 years ago

There are two schools of thought on this classic problem:

  1. Have a version.
  2. Don't have a version, and instead have optional features that are present or absent. Make new versions of individual features as needed, instead of making new versions of the entire format.

I'd favor option 2 in cases like this, since there are so many different use cases for the format that it's hard to keep everyone in sync. What do you think?

lassik commented 3 years ago

Popular examples of option 2 are PNG and RIFF (e.g. .wav) files, and if memory serves, also .ogg files. The file is a sequence of chunks, and each chunk starts with a type identifier. Programs reading the files skip chunks they don't understand.

lassik commented 3 years ago

If we have cond-expand, it already gives us a lot of flexibility for working around problems.

diamond-lizard commented 3 years ago

I'm not particular. As long as the format is revisable and expandable, I'm happy.

lassik commented 3 years ago

To do that, we should make sure everything has a name tag, instead of relying on e.g. lists with items in a specific order.