3 ms·
I don't think this is a particularly useful example of what rust can do. Other languages can return inner pointers; its not an interesting feature. The only i
by shadowmint 10y ago
I don't think this is a particularly useful example of what rust can do.
Other languages can return inner pointers; its not an interesting feature.
The only interesting thing is that it is both safe and has no gc... but really, this is just another example of safety in rust, via a relatively obscure code snippet.
If you want to pitch rusts safety features, we can do something a bit more interesting, surely?
- roca 10y agoMost safe languages are unable to return inner references. Heap-allocating the inner object doesn't count; object inlining is important for systems programming. You're absolutely right that there are much more interesting examples, e.g. https://t.co/HJV7G4n0PD https://t.co/HJV7G4n0PD. Doesn't fit in six lines though :-)