
Ask HN: Better language than C for playing with pointers - slindsey
In over 20 years of software development, I&#x27;ve only worked with languages that don&#x27;t use pointers. Each time I delve into pointers in C, I run into problems referencing and de-referencing, passing them around, etc. I understand pointers well enough. I&#x27;ve read countless tutorials and really do understand them at the machine level.<p>Can anyone recommend a language other than C that uses pointers, so that I might understand actual manipulation better? I&#x27;m not interested in a discussion of why they are bad and how we should use Rust. This is purely for my own education to get past this weird block I seem to have when I try to use them in real applications.
======
olodus
Zig maybe. While it is still in a quite early phase it in my eyes keep much
closer to C syntax and language feeling than C++, while still having smart new
solutions. Some of these are in the pointer domain.

For example it has a couple of different pointer types for the different ways
arrays can be handled in C, such as Null terminated, compile-time-known size
or runtime-known size. This could help you think about how pointers and
collections go together.

------
catacombs
Golang uses pointers and is a descendant of C, so you should feel at home.

~~~
slindsey
Really? Cool. I don't know why, but I've avoided Go for some reason. I didn't
even realize it had pointers. Thanks.

------
jki275
c++11!

Really it's just a matter of actually doing it. I read books, I studied, I
"knew" how they worked, but until I wrote a linked list from scratch and
actually used it for a while I really didn't understand it.

