Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
1–10 of 174 posts
Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#2Could someone explain to me when one would use this? Is it for educational purposes perhaps?
Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#3I thought of a rather nice way to picture it, the C++ type system is like you have Roman Numerals, and so now the notation itself fights trying to understand important concepts about numbers (types). Languages with a better type system are like having Arabic Numerals, it's not a panacea, but the notation allows significant improvements in expressiveness and teachability.
This analogy seems especially apt because Roman Numerals lacked zero as I understand it, and the C++ type system doesn't cope well with the idea of ZSTs nor with the Empty types which are analogous to zero in type arithmetic.
Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#4This borrow checker runs at runtime, which I find not as interesting. Everything starts to look a lot like std::unique_ptr which I think is mostly unneeded as it ads pointer indirection. Could someone explain to me when one would use this? Is it for educational purposes perhaps?
For memes, obviously.
Me: I want Rust!
Tech lead: We have Rust at home!
Rust at home: rusty.hpp
Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#5The C++ type system is completely inadequate for these tasks. I thought of a rather nice way to picture it, the C++ type system is like you have Roman Numerals, and so now the notation itself fights trying to understand important concepts about numbers (types). Languages with a better type system are like having Arabic Numerals, it's not a panacea, but the notation allows significant improvements in expressiveness an…
Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#6The C++ type system is completely inadequate for these tasks. I thought of a rather nice way to picture it, the C++ type system is like you have Roman Numerals, and so now the notation itself fights trying to understand important concepts about numbers (types). Languages with a better type system are like having Arabic Numerals, it's not a panacea, but the notation allows significant improvements in expressiveness an…
Actually it is more like having both Roman and Arabic Numerals on the same source code, depending on the age of the project, and the C and C++ education background of the team.
Regardless of "age of the project" or other considerations, this doesn't seem like a particularly tricky edge case of generic programming and yet C++ is stumped AFAICT
Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#7Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#8Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#9Re: Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
#10All the pain of rust PLUS all the pain of C++.