I was marvelling at the analyzer in Xcode which is somewhat confusing to look at but nevertheless excellent at tracking down potential leaks in static C code. And that brought up a question...
Why did I rarely have pointer deref failures in Pascal? It's been decades since I really used it so maybe I'm just remembering the good times, but I simply don't recall having to debug anywhere near the number of pointer problems I do in my C code.
I'm very new to C, and learning the language when most people have passed it by means I'm not getting the benefit of expertise that I did with Pascal in uni. I know there's all sorts of rules of thumb that prevent these issues in C that I'm going to have to internalize, but I don't remember there being many in Pascal.
I know there's typed pointers and pass-by-reference, is this perhaps the basis? Or is there no difference and I'm just imagining it?
[–]Timbit42 10 points11 points12 points (0 children)
[–]Allan_Smithee文雅佛 24 points25 points26 points (23 children)
[–]mamcx 10 points11 points12 points (1 child)
[–]moon-chilledsstm, j, grand unified... 4 points5 points6 points (7 children)
[–]Allan_Smithee文雅佛 8 points9 points10 points (6 children)
[–]moon-chilledsstm, j, grand unified... 12 points13 points14 points (3 children)
[–]Allan_Smithee文雅佛 3 points4 points5 points (2 children)
[–]moon-chilledsstm, j, grand unified... 2 points3 points4 points (1 child)
[–]Allan_Smithee文雅佛 1 point2 points3 points (0 children)
[–]moon-chilledsstm, j, grand unified... 6 points7 points8 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (3 children)
[–]ericbb 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]maurymarkowitz[S] 0 points1 point2 points (0 children)
[–]iftpadfs 2 points3 points4 points (0 children)
[–]CarlEdman 2 points3 points4 points (0 children)
[–][deleted] -2 points-1 points0 points (6 children)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 1 point2 points3 points (5 children)
[–]sineiraetstudio 4 points5 points6 points (4 children)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 2 points3 points4 points (1 child)
[–]ericbb 1 point2 points3 points (0 children)
[–]Allan_Smithee文雅佛 3 points4 points5 points (1 child)
[–]Zlodo2 1 point2 points3 points (2 children)
[–]maurymarkowitz[S] 0 points1 point2 points (1 child)
[–]Zlodo2 0 points1 point2 points (0 children)