Re: Collection of Cocoa & objc questions from a "newbie"
Re: Collection of Cocoa & objc questions from a "newbie"
- Subject: Re: Collection of Cocoa & objc questions from a "newbie"
- From: "David P. Henderson" <email@hidden>
- Date: Mon, 16 Jul 2001 22:05:39 -0400
On Monday, July 16, 2001, at 09:48 , Chris Gehlker wrote:
>
Actually this isn't quite right. ANSI C, ObjC and ANSI C++ have exactly
>
the
>
same rules for functions. ANSI C++ and ObjC have different rules for
>
methods. ObjC follows the "Definition is Declaration" for methods that
>
both
>
ANSI C and ANSI C++ use for functions.
>
But that is not quite right either. In C and Objective-C, you can
implicitly declare a function. You will get a compile time warning about
it but the file will compile and run. In C++, you must explicitly
declare a function either through prototyping or definition; an implicit
declaration such as is legal in C earns you a compile time error and
your build fails.
>
C++ is a little more consistent. Methods are members of the class and
>
must be treated as such.
>
I think in C and ObjC better than I do in C++ ;)
Dave
--
Chaos Assembly Werks
"The difference between Objective-C and Java is: in Java , the
language/compiler enforces paranoia, but in Objective-C, the programmer
enforces paranoia."