4 ms·
Safe Rust takes some time to _unlearn._ By which I mean, there are (in my opinion) objectively bad practices that a linear language prevents you from doing - su
by zamalek 2y ago
Safe Rust takes some time to _unlearn._ By which I mean, there are (in my opinion) objectively bad practices that a linear language prevents you from doing - such as cyclic data graphs in memory. Rust is hard because you need to unlearn bad habits, and then learn how to solve those issues all over again.
I believe that's a good thing (in general, constructive constraints are good), but it is just an opinion.
- kazinator 2y ago"Cyclic datagraphs bad" is a perfect example of religious Rust brainwashing. Cyclic structures in memory are not bad just because the one-memory-management-trick pony language you're currently infatuated with doesn't handle them within its safety paradigm. Graph structures are entirely legitimate in computer science, and are handled nicely by garbage collection which is the gold standard in memory management. Fully general lexical closures lead to cycles even when no variables are mutated. And even if no circular definitions are supported in the language. We can use the Y combinator to create a cycle: a situation when a function's captured environment contains a binding whose value is that function itself.