Pop quiz: is sizeof a function?
(Hint, no, its an operator. Like -- and &. Do you prefer this form: --(someint);
(Hint, no, its an operator. Like -- and &. Do you prefer this form: --(someint);
Feel free to grep through your /usr/include for sizeof and see which way is more common.
sizeof some_struct; //computed at *compile* time
sizeof(some_struct); // also computed at *compile* time, but looks like its a runtime call
Anything that looks like something but isn't actually that thing, in my opinion - especially with a language like C - is room for programmer enlightement ..is looking unconventional. Couple of reasons... You generally want to avoid +1 / -1 in your code. You don't want to write sizeof() without parenthesis, - it reduces readability.
2. sizeof is not necessarily done at compile time. C99 allows variable-sized automatic arrays, forcing it to store and later look up the value at runtime if you use sizeof.