Skip to content

Alternative metadata syntax/semantics #439

Closed Answered by stephenberry
mathiasgredal asked this question in Q&A
Discussion options

You must be logged in to vote

@mathiasgredal

After considering this syntax more, I've come to the conclusion that it isn't a good design for a variety of reasons. These features are all supported by the current approach of glaze, using member variable pointers, but are not supported with the field approach without additional code from the user and/or additional runtime cost.

The field approach has the following issues:

  • Has issues/complexities with non-default constructible classes
  • Doesn't support third party libraries (would need to be edited)
  • Difficult to use references in a struct
  • Makes it harder to remove serialization when it isn't wanted
  • Makes classes more complex for programmers with additional interfaces for b…

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@stephenberry
Comment options

@stephenberry
Comment options

@mathiasgredal
Comment options

@stephenberry
Comment options

Comment options

You must be logged in to vote
1 reply
@stephenberry
Comment options

Comment options

You must be logged in to vote
2 replies
@mathiasgredal
Comment options

@stephenberry
Comment options

Answer selected by stephenberry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #438 on September 22, 2023 17:10.