One of the more unexpected things writing Rust did to my C coding habits is to make me stop using pointer arithmetic.
-
-
Replying to @pcwalton
I guess you mean "use only well-constrained pointer arithmetic" since C has no array access without pointer arithmetic.
1 reply 0 retweets 2 likes -
Replying to @RichFelker
Yeah, I mean I write “&foo[1]” instead of “foo + 1”.
2 replies 1 retweet 10 likes -
Replying to @pcwalton
I feel like that's just syntactic games. The real difference is never using pointer vars that point into arrays, instead using a pointer to the array and an index. But...
1 reply 0 retweets 0 likes
Replying to @RichFelker @pcwalton
...restricting yourself like that precludes use of subarrays, string tails, etc.
7:28 PM - 31 May 2018
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.