-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define/Implement scema format #46
Comments
@Abscissa [sorry if it's only very mildly related] I'm wondering whether SDL would be a good fit for protobuf human readable format (see msoucy/dproto#71 (comment) where i was trying to improve on default protobuf text format which I don't like because of treatment of repeated fields) (also very mildly related to #30 since that deals with conversion from X to/from SDL)
one important use case would be reading in structured data (with an enforced schema) to command line programs:
|
My understanding of protobuf isn't especially deep (it's been a long time), but from what I do know of it: Yea, the SDLang format should work fine for it, I don't see why not. Incidentally, some time ago I did have a go at designing a schema format for SDLang written in SDLang, but in doing so I came to the conclusion it would make far more sense to just use D structs/classes with UDAs as the schema, like most typical serialization libs. Eventually, an SDLang-based SDLang schema could still be developed if sharing an SDLang schema across different programming languages becomes an important concern (much like protobuf), but I think UDA-based serialization is a far more sensible (and arguably necessary) as a first step. |
Just mentioning for completeness: https://code.dlang.org/packages/vibe-sdlang This implements a |
Obviously in SDLang itself, of course.
This will allow for a much simpler, more robust API that's more statically-typed and has vastly better error-checking built-in for both parsing and writing.
It should also help with a generic "SDLang <--> other formats" converter (ie, #30).
I have some work done on the design, but still need to finish & implement.
The text was updated successfully, but these errors were encountered: