News for hackers. Stuff that matters.
Re:Show HN: I built a web framework in C by jug on Thursday October 09, 2025 @06:38PM (#45533771)
The worst thing with C pointers was for me that the asterisk is inexplicably used both to declare a pointer and a COMPLETELY different operation of dereferencing a pointer.

I still don't understand this decision. I think it should've been like int^ p = &i; ... or ... int i = *p;

Everything clicked ironically when I went even deeper and studied assembly language. Then following pointers to data vs just reading pointers becomes very clear and explicit.

Re:Show HN: I built a web framework in C by sgsjchs on Thursday October 09, 2025 @07:48PM (#45534192)
> I still don't understand this decision.

Variable declaration `T v;` means "declare `v` such that expression `v` has type `T`". Variable declaration `T *p` means declare `p` such that the expression `*p` has type `T`". etc.

Re:Show HN: I built a web framework in C by kopirgan on Thursday October 09, 2025 @11:14PM (#45535088)
Nice explanation!
Re:Show HN: I built a web framework in C by tealpod on Friday October 10, 2025 @03:06AM (#45536102)
> asterisk is inexplicably used both to declare a pointer and a COMPLETELY different operation of dereferencing a pointer.

This is the most confusing concept of pointers. I feel this could have been easily avoided with different character like ~ or ^ or other.

Re:Show HN: I built a web framework in C by 1718627440 on Friday October 10, 2025 @09:43AM (#45538954)
Why? In C all the declarations work like that:

    float * (*foo(int *)) (int);
foo is something, that can be called with an 'int *', which results in a pointer to something that can be called with an 'int', which results in something which can be dereferenced, which is a float.