Re: Obj-C vs Java
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>