2 ms·
If you have an array and an index, you have all the complexity of pointers. The only difference is that Haskell will bounds check every array access, which is a
by liontwist 2y ago
If you have an array and an index, you have all the complexity of pointers. The only difference is that Haskell will bounds check every array access, which is also a debug option for pointer deref.
- 3836293648 2y agoYou are very disconnected from learners. They get confused over mutability, not bounds checking, which is not an option for raw pointers consistently
- CRConrad 2y agoHard to believe that “learners ... get confused over mutability” more than functional programming when millions of middle-schoolers grokked the idea of “mutability” in the form of variables in Basic, while I (and at a guess, at least thousands of other experienced programmers) have no fucking idea about pretty much all the stuff in most of the tens or hundreds of articles and discussions like this that we've seen over the years. Just plain stating that “mutability is more difficult” without a shred of evidence ain't gonna fly.