3 ms·
About 80% of my battles with the borrow checker eventually resolve with me realizing the code I'm trying to get working could lead to a bug in a case I hadn't c
by whatshisface 6y ago
About 80% of my battles with the borrow checker eventually resolve with me realizing the code I'm trying to get working could lead to a bug in a case I hadn't considered. Of course, I could just be an abnormally sloppy programmer.
- throwaway894345 6y agoIn my experience, borrow checker errors would only be “bugs” in a program that doesn’t have a garbage collector or if there is shared memory parallelism involved. Put differently, if you slapped a borrow checker on Go and your program was single-threaded, (I posit but welcome correction) borrow-checker errors would probably not be uncovering many bugs.
- dj_mc_merlin 6y agoYes, the point of the borrow checker is memory safety without GC.
- whatshisface 6y agoNot for me, it's usually something related to aliasing or iterator invalidation.