Comment by Hunpeter
3 days ago
Someone said in another comment, that it makes more sense together with the dereference operator, so int *var means: "dereferencing var gets you an int."
I don't really know C, but personally prefer your version. However, I can also get behind considering the * to be part of the variable, rather than a type: "var is a pointer that happens to hold an int". I mean, maybe they could have used the & operator meaning "var is an address holding an int"? Honestly, it just feels like there's too much tradition and legacy and so on, and what one considers intuitive is the thing that they're most used to.
No comments yet
Contribute on Hacker News ↗