Dedicated reference types #1717
johnwason
started this conversation in
Language design
Replies: 1 comment 5 replies
-
I'm not clear what you're trying to suggest here. Given you express concerns about performance characteristics, please bear in mind that reference counting/GC creates significant overhead. We talk a little about this in our safety strategy, and also the FAQ. You might consider using Rust if you can: it's a great language and its design addresses a lot of the performance concerns, but at the cost of a different design requirement. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am a robotics engineer, and am interested in this project because I find C++ to be very cumbersome compared to more modern alternatives. Unfortunately the more modern alternatives don't have the necessary performance characteristics or the libraries required.
My suggestion is that a new design include features like dedicated smart reference types and reflection as part of the base specification. .NET C++/CLI used special syntax (various combinations of ^ and %) to represent managed types. The exact implementation of reference counting and/or garbage collection can be left to a library, but it would be very beneficial if the hooks to implement a smart reference are already present rather than trying to bodge something later like smart pointers and garbage collection in C++.
Beta Was this translation helpful? Give feedback.
All reactions