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

Macro ideas? #140

Open
sindresorhus opened this issue Jun 6, 2023 · 4 comments
Open

Macro ideas? #140

sindresorhus opened this issue Jun 6, 2023 · 4 comments

Comments

@sindresorhus
Copy link
Owner

I wonder if we could use macros to simplify some things?

@hank121314
Copy link
Collaborator

hank121314 commented Jun 7, 2023

I would like to give Defaults+Extension.swift a shot. There is so much duplicate code that we should use macros to handle it!

@sindresorhus
Copy link
Owner Author

I was thinking more towards user-facing APIs. Not sure it's worth it for Defaults+Extension. Macros bring a lot of ceremony and obtuseness. It should be used sparingly to simplify things that are used very frequently. I can live with boilerplate inside Defaults. It won't change much going forward anyway. What I care about is simplifying Defaults public usage.

@hank121314
Copy link
Collaborator

For user-facing APIs, I believe that having a macro that can automatically create bridges for user-custom types would be amazing!

@sindresorhus
Copy link
Owner Author

I believe that having a macro that can automatically create bridges for user-custom types would be amazing!

👍

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