Then again, at least in C, the mantra is “declaration follows usage”. Surely you don’t write pointer dereferences as * ptr
? Most likely not, you most likely write it as . The idea behind the
int *ptr;
syntax is basically that when you do , you get an
int
.
And with this idea, stuff like function pointers (int (*f)(void)
), arrays of pointers (int *a[10]
) versus pointers of arrays (int (*a)[10]
) etc. start making sense. It’s certainly not the best way to design the syntax, and I’m as much a fan of the Pascal-styled “type follows the identifier” syntax (e.g. let x: number;
) as anyone, but the C way does have a rhyme and a reason for the way it is.
Certainly not as cute as a TF2 sentry, but looks more than capable of solving practical problems.
It’ll certainly be a nasty surprise for any invader to have just one of these in a location. And if that doesn’t work? Use more gun!