• 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: Obj-C vs Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obj-C vs Java


  • Subject: Re: Obj-C vs Java
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 23 Jul 2001 21:03:02 -0500

At 11:29 PM +0200 7/23/01, Bernard van Gastel wrote:
Thanks. I wasn't aware of the static issue when subclassing (though I have 2 years Java experience, guess I have never run into it). I am a bit confussed about class methods. What is the diffenence with static Java methods (not counting the subclassing issue)?

The subclassing issue is the important one though. It can be really convenient at times to override class methods of one of your parent classes.

The fundamental issue I think is that Java is still stuck in C++ thought; classes are glorified structures that have functions as members (thus "member functions"). Objective-C is an object-oriented language in the Smalltalk spirit; this means that most things are objects *including classes themselves*.

So when you say "instance method" you're referring to the method that wil be invoked when an instance of a class is sent a message. When you say "class method" you're referring the method that will be invoked when a *class* is sent a message. And you can work with them using exactly the same conceptual tools.

-- Chris

--
Chris Hanson <email@hidden>
bDistributed.com: Making business distributed.
Personal email: <email@hidden>


References: 
 >Re: Obj-C vs Java (From: Bernard van Gastel <email@hidden>)

  • Prev by Date: Re: cocoa-dev digest, Vol 1 #312 - 16 msgs
  • Next by Date: Re: Use of NSLog() for debugging
  • Previous by thread: Re: Obj-C vs Java
  • Next by thread: Re: Obj-C vs Java
  • Index(es):
    • Date
    • Thread