-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Milestone
Description
It would be nice to have default functionality common to binary/stringified NBT accessible with Nbt.[...], but the current NbtFormat/Nbt/StringifiedNbt naming doesn't work nicely with that.
Brief rationale:
- Having
Nbt.[...]for the API feels nicer from a naming perspective for basic un-configured serialization - This API could be added under the current (binary)
Nbtclass- but the companion object would implement
NbtFormat, and it feels awkward/unexpected to be a different configuration type
- but the companion object would implement
- This API could be added to the
NbtFormatinterface as a companion object- but it feels awkward/unexpected to have to write
NbtFormat.encodeToNbtTag(serializer, value)
- but it feels awkward/unexpected to have to write
- It feels better to me to have the
Nbtclass represent the general structure for the format, dealing with the in-memory representation and theNbtTagclasses.- It would be an actual concrete & usable API, instead of just a parent interface for shared functionality.
- Then, have more types of
Nbtnamed according to what functionality they bring (BinaryNbtandStringifiedNbt).
- This new naming means all general NBT API is named
Nbt-, while binary/stringified API areBinaryNbt-andStringifiedNbt-, making the API easier to find through intellisense, and grouping code files more nicely when alphatized.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels