2 ms·
Another approach is that object's available methods cannot change over time, but this requires move semantics: `close(file)` consumes `file`, so you can't invok
by nine_k 8y ago
Another approach is that object's available methods cannot change over time, but this requires move semantics: `close(file)` consumes `file`, so you can't invoke anything else on it.
Rust has this built-in (lifetimes and move / borrow semantics); I suppose C++ can model this, too.
- Zalastax 8y agoYes! Changing available methods/consuming data terms are virtually the same - the former can be modelled as having methods consume their object and returning a copy of it that has another type. My background is in distributed systems and there linearity has a big cost, which is why the research I mentioned needs to be done.