3 ms·
I think the author has left out a big piece why Rust enables better interface here: ownership. In C++ could the compile time checks prevent me from creating bot
by laci37 3y ago
I think the author has left out a big piece why Rust enables better interface here: ownership. In C++ could the compile time checks prevent me from creating both an input and output type working on the same pin?
- actionfromafar 3y agoYes! Hell we did such things in C and a little custom build tool support.
- pjmlp 3y agoYes, you would have different set of classes with invariants. With template metaprogramming those invariants can be done at compile time. It is a matter of type system design, the whole point of type-level programming.