-
Notifications
You must be signed in to change notification settings - Fork 45
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
declare_class!
macro
#190
declare_class!
macro
#190
Conversation
Consider the following method: impl MyObject {
@sel(myMethod:)
fn my_method(&self, arg: i32) {
// Body
}
} There are essentially three ways to handle converting the methods into the proper
I like option 2 & 3 because they preserve what the user wrote, i.e. their function stays exactly the same and they can call it as such! However, option 2 has the downside that we can't name the So... Yeah. I'll probably go with option 1, if users want to access the method's functionality from Rust they should either use There might be merit in making it create said accessor method that uses Idea: Maybe use |
6547b2c
to
aa12984
Compare
A downside is that EDIT: See rust-lang/rustfmt#5437, a way to fix it would be to use pure-Rust syntax (e.g. no |
To allow extra processing step after @rewrite_methods
We don't actually want people to call these, and it'd be an easy way for libraries to accidentally introduce unsoundness
For now at least, since this will allow us to easier change implementation details later on. May have to re-evaluate this decision at some point.
This allows using types in the inheritance chain again
Blocked on #193.Solves a big part of #30. Fixes upstream SSheldon/rust-objc#74.
Related to #161, and has a few of the same limitations when it comes to defining methods.
Syntax:
The really cool thing here is the instance variable setup, with that, users can just do
self.ivar
in a completely hassle-free manner!