• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Collection of Cocoa & objc questions from a "newbie"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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."


  • Follow-Ups:
    • Re: Collection of Cocoa & objc questions from a "newbie"
      • From: Chris Gehlker <email@hidden>
References: 
 >Re: Collection of Cocoa & objc questions from a "newbie" (From: Chris Gehlker <email@hidden>)

  • Prev by Date: Re: cocoa-dev digest, Vol 1 #289 - 12 msgs
  • Next by Date: Re: Flame war
  • Previous by thread: Re: Collection of Cocoa & objc questions from a "newbie"
  • Next by thread: Re: Collection of Cocoa & objc questions from a "newbie"
  • Index(es):
    • Date
    • Thread