savefile icon indicating copy to clipboard operation
savefile copied to clipboard

Attributes should be reworked

Open avl opened this issue 4 years ago • 2 comments

Savefile uses a whole lot of attributes right now, all with the prefix 'savefile_' in their names.

It would probably be better if instead the attribute was called 'savefile', and then different arguments to this single attribute were used.

This would be a breaking change without a huge tangible benefit. There are a few ways forward

  • Just do the change, increasing the semver major version.
  • Add the new attribute in parallel with the old ones, and deprecate the old ones in the next major version.

avl avatar Jul 18 '20 09:07 avl

Are you talking about a similar approach to serde, as outlined here? That would certainly make it look much cleaner.

semirix avatar Apr 07 '22 05:04 semirix

Yes, something like:

#[savefile(versions="1..")]

instead of today's:

#[savefile_versions="1.."]

avl avatar Apr 07 '22 20:04 avl