-
Notifications
You must be signed in to change notification settings - Fork 18
Deriving Q_OBJECT with Macros 1.1 #10
Comments
The question is -- would it worth it? Or is it better to wait for Macros 1.2, which supposedly should support procedural macros. |
The current macro might be a bit inflexible, but to be honest it is much more readable and intuitive then the alternative mentioned here.
From a design point of view I think the functionality exposed in this crate does much more than a But then, the additional flexibility is nice. I think the main question here is, if this additional flexibility is needed (now)? And if it is worth the (from my pov) decrease in PS: So in total I think it might be a good idea to wait for Macros 1.2, maybe even Macros 2.0 (depending on how long that would take, I'm not really up to date regarding the macro 2.0 development status). The idea would be to experiment more with QML/rust until then and then ship a first more stable release with the new (hopefully more hygenic etc.) macro system. |
@dathinab Thanks for the input! Yes, I totally agree, that the readability is suffering with this alternative. However, if such flexibility would be required, there can be both custom derive and existing macro existing. I agree with you that it might be a good idea to wait for procedural macros to come, I just wonder how long is the wait. Unfortunately, procedural macros is the thing rust developers would want to get right, so there is no hurry. |
The only input i can give you about that is the perspective of the lib user. As i saw your example i am quit sure i like the macro syntax more. |
@pythoneer yeah, I guess it's just got to wait for Macros 2.0. i hope it won't be a big wait. |
Since the release of the nightly macros 1.1 that should support custom derives on stable rust, I've been wondering if it would be possible and feasible to use them to derive Q_OBJECT, instead of using current inflexible macro
Q_OBJECT!
.An example of deriving that would fully use conceived features:
The text was updated successfully, but these errors were encountered: