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

Vision for macros in StateTree #19

Open
adam-zethraeus opened this issue Jun 14, 2023 · 1 comment
Open

Vision for macros in StateTree #19

adam-zethraeus opened this issue Jun 14, 2023 · 1 comment

Comments

@adam-zethraeus
Copy link
Collaborator

There's some clearly-related experimentation at https://github.com/adam-zethraeus/DictionaryBackedMacro

Any implementation would be api-breaking at a time when that's quite undesirable — so vision/plan required here first.

@adam-zethraeus
Copy link
Collaborator Author

Thoughts:

  • use @Node annotation instead of conformance
  • provide default empty var rules
  • add transaction(_:) and run(behavior:) methods, deprecating @Scope
  • make fields as values by default
    • require @Projection fields to be explicitly marked as 'ancestor-owned'
    • perhaps add 'unmanaged' annotation to capture the current stored-var behavior. iff its behavior can be well defined.

@adam-zethraeus adam-zethraeus changed the title Vision for Swift Macros Vision for macros in StateTree Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant