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

Generate type constructors instead of functions for attributes #8

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

kmicklas
Copy link
Owner

@kmicklas kmicklas commented Jul 7, 2024

This solves a few different issues:

  • Removes conflicts between elements and attributes with the same name (e.g. span) if both modules are imported unqualified
  • Visually distinguishes attributes from elements at use sites, which has long annoyed me
  • Paves the way for a nice syntax for enumerated attributes, e.g. Type::Checkbox instead of type_(TypeValue::Checkbox)

@kmicklas kmicklas merged commit 887ea02 into main Jul 7, 2024
1 check passed
@kmicklas kmicklas deleted the attrs-as-types branch July 7, 2024 12:26
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

Successfully merging this pull request may close these issues.

None yet

1 participant