• 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: Bernard van Gastel <email@hidden>
  • Date: Mon, 23 Jul 2001 23:29:11 +0200

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)?

I have a cool Java networking app (ok, I think it's cool), and I can convert the networking code to Obj-C for peformance (because of the superior peformance) and the rest of the app in Java for compatiblity and easy development (only have to write code once).

Bernard

Op maandag 23 juli 2001 om 23:18 schreef Enrique Zamudio:

- is Obj-C a better OO language than Java?

I would say Definitely!

- which language is more powerful?
ObjC

- which language is faster to develop? (Java, because of less
debugging with memory leaks???)
well, maybe there are less memory leaks, but in my experience you end up
writing more code in Java than inObjC.

- what are the special down sides of Java and Obj-C?
downsides of Java:
- you can't send messages to null (this raises an exception)
- There is no abstract object type (like the id type in ObjC)
- because of the previous point, you have to do a lot of type casting.
- inheritance is kind of weird (there are no class methods; only static
methods but since they're static, subclasses don't inherit them).
- slow because of the byte-code and the VM (although I think there are
workarounds for this)
- compiles a lot slower than ObjC.

downsides of ObjC:
- not portable (the source may be portable but you have to recompile in
every platform you want to run your apps)
- you have to be more careful with memory management (releasing,
autoreleasing, etc)
- you have to be careful on the use of id's (you might point a variable
to an object of the wrong class sometimes, or send it a message that it
won't really respond to and the compiler will not tell you anything if
another object responds to it).
- not so many object libraries as Java has.

I think that the best thing you can do is give ObjC a try and see if you
like it more than Java (or if you NEED to use it, because of some
performance issue or something).

Hope this helps,
eZL



Bernard van Gastel

- - - - -
"Nuclear weapons can wipe out life on Earth, if used properly."
-David Byrne


  • Follow-Ups:
    • Re: Obj-C vs Java
      • From: Enrique Zamudio <email@hidden>
    • Re: Obj-C vs Java
      • From: Chris Hanson <email@hidden>
    • Re: Obj-C vs Java
      • From: "Erik M. Buck" <email@hidden>
References: 
 >Re: Obj-C vs Java (From: Enrique Zamudio <email@hidden>)

  • Prev by Date: Re: Accessing Java from Obj-C
  • Next by Date: Hex instead of decimal?
  • Previous by thread: Re: Obj-C vs Java
  • Next by thread: Re: Obj-C vs Java
  • Index(es):
    • Date
    • Thread