Hacker News

Favorites Setup
Comment by layer8 | original | C for Rust programmers
[−]layer8 · 2026-10-10 Sat 15:16 UTC · link
> Woah, iterating over pointers instead of indexes! […] However, I'm not sure how good an idea that is.

I’d recommend anyone (including the author) wanting to understand C to read K&R’s “The C Programming Language”, which among other things will illustrate how iterating over pointers is idiomatic in C (though not quite in the way the author’s example does it).

[−]Joel_Mckay · 2026-10-10 Sat 15:57 UTC · link
GLib simple C data structures:

https://docs.gtk.org/glib/data-structures.html#doubly-linked...

GSL GNU Scientific Library for C:

https://www.gnu.org/software/gsl/doc/html/intro.html

In general, no one should be custom building most basic structures in C these days. =3

[−]pwdisswordfishq · 2026-10-10 Sat 17:24 UTC · link
Yes. And this is what C++ iterators evolved from.