Skip to content
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

API refactoring suggestions #72

Open
ZILtoid1991 opened this issue Aug 11, 2020 · 1 comment
Open

API refactoring suggestions #72

ZILtoid1991 opened this issue Aug 11, 2020 · 1 comment

Comments

@ZILtoid1991
Copy link
Contributor

I think an overhaul on the API would greatly benefit the library, making the addition of many features much easier, taking inspirations from the XML DOM, while also learning from its mistakes.

  • Every SDL element (comments, tags, attributes, and whatever we want to add to a newer spec of the language) should either inherit a base class or an interface, that encapsulates many common things, e.g. formatting info, position in code, etc. If we do it in a clever way, we can make it with minimal compatibility issues.

  • Dynamic parsing. This most likely could be done after building up the DOM tree, which would give it extra features on top of what the XML SAX parser is capable of.

@Abscissa
Copy link
Collaborator

Abscissa commented Sep 4, 2020

I assume you're referring specifically to the DOM API, and not the pull parser or any other portions, correct? If so, I agree. The whole design of the DOM API is woefully ancient and bitrotted and full of things I would do differently now. It's desperately in need of a redesign.

I'm not sure what you mean by this "dynamic parsing" that's done after a DOM is built...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants