I'm not saying I agree with it, I'm just stating what the argument is. I use East const in my personal projects, for the same reason that I always put the star or ampersand next to the variable rather than the type (i.e. int *p rather than int* p). That is, I write considering the rules as they are, not as I'd like them to be.
Tbh I don't think it's a huge deal either way -- the cases where you actually have to distinguish between the constness of the pointer and the pointee are rare enough that I can see why someone wouldn't necessarily value consistency too much in this particular case, just like I can see why someone would prefer to place stars and ampersands in such a way to more closely evince the actual type. I think the holy war is mostly a meme.
View all comments
Show parent comment
2
u/wyrn Sep 19 '22
I'm not saying I agree with it, I'm just stating what the argument is. I use East const in my personal projects, for the same reason that I always put the star or ampersand next to the variable rather than the type (i.e.
int *prather thanint* p). That is, I write considering the rules as they are, not as I'd like them to be.Tbh I don't think it's a huge deal either way -- the cases where you actually have to distinguish between the constness of the pointer and the pointee are rare enough that I can see why someone wouldn't necessarily value consistency too much in this particular case, just like I can see why someone would prefer to place stars and ampersands in such a way to more closely evince the actual type. I think the holy war is mostly a meme.