Re: Obj-C vs Java
Re: Obj-C vs Java
- Subject: Re: Obj-C vs Java
- From: Enrique Zamudio <email@hidden>
- Date: Mon, 23 Jul 2001 16:18:49 -0500
- Organization: Nasoft
>
- 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