rust-like impl / trait ergonomics? #1427
Replies: 2 comments
-
|
Two points that would worry me from a maintenance/onboarding perspective:
It seems like a nice idea. In larger projects the use of this feature has to be probably very restricted in order to make it maintainable. Just my 2 cents. |
Beta Was this translation helpful? Give feedback.
-
|
Is the point that there may be cases where it is better that you don't have to be aware of every Maybe adding impl / trait ergonomics has less value for cppfront given that cppfront has unified function call syntax where you can call |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not particularly a fan or even a user of Rust, but separating data, interface, and members via impl appears quite pleasing. I'd suspect that similar functionality could be achieved with metaclasses and reflection, but cpp2 also provides an opportunity for exploring this in a more macro-like sense: simply merging the pieces together as needed at transpilation time.
I'm making this discussion less of a suggestion and more just because I'm interested to hear any opinions or prior-art on this.
Beta Was this translation helpful? Give feedback.
All reactions