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

Don't match macros on exact type names #96

Open
andybarron opened this issue Nov 12, 2016 · 2 comments
Open

Don't match macros on exact type names #96

andybarron opened this issue Nov 12, 2016 · 2 comments

Comments

@andybarron
Copy link
Contributor

See this comment on a previous issue. Matching macros on exact type names prevents users from calling the macros with fully qualified type names or typedefs.

Possible solutions include trait specialization (which will likely be unstable for some time) and std::any trickery.

@dragostis
Copy link
Member

dragostis commented Nov 22, 2016

@andybarron I'm planning on solving #90 and the rest of the small bugs soon. The way I see it, with these solved, this would be a pretty good time to release 1.0.0, apart from this current issue. Should I postpone the release until this one is solved as well?

@dragostis
Copy link
Member

I gave this a shot, but I don't really see how this could be done without procedural macros. One reason why this doesn't work is that if you keep the argument types opaque in tys, you won't know anything about the mutability of the object that must be bound to the current argument's name. Another one would be the return type.

With procedural macros and trait specialization, this would be easy: see mutability in order to bind to the specified argument name and use trait specialization in order to allocate and convert the objects.

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

2 participants