Ask HN: Better language than C for playing with pointers
3 comments
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.
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.
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.
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.
Can anyone recommend a language other than C that uses pointers, so that I might understand actual manipulation better? I'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.