C++ compiles down to 90 lines of ASM.
https://godbolt.org/z/YYaK8f9rz
Rust compiles down (up?) to 1428!
https://godbolt.org/z/91YfzT5fb
Thanks, I hate it! Do dynamic typing next!
https://godbolt.org/z/YYaK8f9rz
Rust compiles down (up?) to 1428!
https://godbolt.org/z/91YfzT5fb
Thanks, I hate it! Do dynamic typing next!
I'm not talking about GP right now. "Thanks, I hate it." actually made me smirk a little bit and his links to assembly were actually super informative. So in this case humor was great but there was also substance which I felt I need to respond to with "what's in it for me".
I also believe they would be much closer if the C++ example used shared pointer.
EDIT:
As far as I can tell less than 190 lines of asm but I don't know shared_ptr enough to produce exactly the same code.