Another example is if someone tried to use a Vec x inside the closure passed to x.drain.
79 karma · joined December 11, 2019
Another example is if someone tried to use a Vec x inside the closure passed to x.drain.
> doesn’t Rust refuse to compile even when you use non-concurrency safe objects in a single thread?
and given that most types (Vec, HashMap, etc.) aren't "concurrency-safe" (thread-safe?), your answer
> yes
is rather perplexing.
These markers are irrelevant in a single-threaded scenario.
But this convention is not at all respected in programming (e.g. + for string concatenation in many languages) so I have to admit that it's pretty irrelevant.
Why reading a research paper rather than the more standard approach of reading a textbook?
Edit: The article says "magical hidden properties".
Quaternions and rotors are exactly the same in practice, but the intuitions are very different. The intuition behind rotors involves planes and lines in 3D, whereas the intuition behind quaternions typically involves a unit hypersphere; there's a 3B1B video on quaternions where you can learn more about them.
Isn't Rust's workaround their "edition" system? It seems to be working pretty well for them, but it sounds like it could end up being a massive maintenance headache.
https://doc.rust-lang.org/nightly/edition-guide/editions/ind...
The equivalent in Haskell would be "compose :: (a -> a) -> (a -> a) -> a -> a", which lacks "impl" because it boxes all closures (each closure in Rust has its own type), and lacks "Fn" because it doesn't care about what kind of access the closure needs to its context (Rust distinguishes between Fn, FnMut and FnOnce). Still, the Rust is only a tiny bit more complicated than the Haskell.
Another example application of adaptive sorts is the sweep-and-prune broadphase collision detection algorithm that's somewhat commonly used in physics engines.
You answered your own question. Some of us don't have an ounce of charisma<del>, and some of us have been conditioned by years of loneliness to never initiate a conversation</del>. I think this is a pretty valuable service.
Anecdote: My uncle explicitly stated on his dating profile that he was looking for women with masters degrees who were willing to stay at home. I have no idea why he wanted that or why my dad's sister agreed, but this kind of demand is oddly common.