[MUD-Dev] [TECH] [ObjC] : programming languages - Obj-C as opposed to Java

Kwon Ekstrom justice at softhome.net
Thu Aug 16 16:01:43 New Zealand Standard Time 2001


From: "Brian Hook" <bwh at wksoftware.com>

> I'm not qualified to thoroughly argue the merits of Objective-C
> vs. Java -- I haven't done Java coding in about three years -- but
> I can say that, subjectively speaking, Objective-C has felt more
> "right" to me than any other language I've used.  The
> accessibility of constructs like proxy objects, delegation and
> forwarding is just wonderful.  It was designed with RPC and
> distributed objects in mind.

> I'm not particularly fond of some of features that Java has
> (mandatory typing, exception handling), and one of the things I
> specifically like about Obj-C is that it is weakly typed.  When I
> decry the integration of implementation/interface in Java, it's
> the fact that there aren't separate header/source files.
> Everything is declared and implemented "in place", which means a
> change in implementation can often result in a massive recompile.
> At least in C++ you can get around this somewhat using opaque
> pointers.  After working on my latest code base, I am now very
> appreciative of minimizing dependencies as much as possible.  Full
> rebuilds were taking FOREVER until I finally ripped out STL and
> sat down for a night to sort out my dependency graphs.

I've never used objC so I can't say anything about how things are
handled with it, but it sounds like you're java code suffered from
poor design rather than language problems.  I try to define
constants on interfaces, and attempt to use more or less unique
naming of constants (because of multiply interface inheritance).
You can then modify the interfaces for a pretty similar affect to
modifying constants in header files.  As for other things such as
methods and fields, I prefer the fact that java objects are stored
in a single place.

As for exception handling, it's one of the features of java I find
most useful.  It takes a major error to bring my source down, the
mud server I'm writing uses exception handling and I've only caused
it to crash once, because of a faulty null check in the channel code
(with the logs being piped back to the channels) which caused a
stack overflow.

For the rest, I'm sure it's just a matter of preference, I prefer
strongly typed programing languages over weakly typed ones.  It
gives a sence of control and forces the need to be explicit, I'll
admit that I still have issues with java's garbage collector, it
feels wrong to forget about objects... but that's my desire for
control.

-- Kwon Ekstrom


_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list