Re: static typing (Learning Cocoa Chapter 13)
Re: static typing (Learning Cocoa Chapter 13)
- Subject: Re: static typing (Learning Cocoa Chapter 13)
- From: "Erik M. Buck" <email@hidden>
- Date: Fri, 21 Sep 2001 16:09:10 -0500
In the name of aesthetic flame wars:
The asterisk indicates that a variable is a pointer not that a type is a
pointer. The asterisk therefore belongs with the variable and not the type.
The simplest highlight of that fact follows:
char *foo, bar, *baz;
foo is a pointer (probably 4 bytes)
bar is a character (probably 1 byte)
baz is a pointer (probably 4 bytes)
If the pointerness was part of the type then
char* foo, bar, *baz;
would make foo a pointer, bar a pointer, and baz a pointer to a pointer
which is of course wrong and ludicrous.
----- Original Message -----