asdf-format / asdf-standard

Standards document describing ASDF, Advanced Scientific Data Format
http://asdf-standard.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
70 stars 29 forks source link

Drop subclass_metadata from the standard #246

Open perrygreenfield opened 4 years ago

perrygreenfield commented 4 years ago

This is an experimental feature that sought to make serialization of subclasses more convenient by reusing the superclass's schema, with some additional metadata appended to inform the library of which subclass to instantiate. This feature has some drawbacks. For one, the name of a class or subclass is an implementation detail that is meaningless to other ASDF implementations. Another drawback is that by using a generic schema for multiple subclasses, we are not able to validate as strictly as we could with separate schemas – for example, if subclass A requires property "foo", but subclass B does not, we can't make the property required because both objects must validate against the same schema.

These drawbacks may be reason enough to remove subclass_metadata from the standard.

nden commented 3 years ago

Is this done now? Can we close the ticket?