Re: Cross platform Cocoa/Obj-C
Re: Cross platform Cocoa/Obj-C
- Subject: Re: Cross platform Cocoa/Obj-C
- From: Brian Hook <email@hidden>
- Date: Fri, 21 Dec 2001 20:56:44 -0800
At 10:43 PM 12/21/2001 -0600, Erik M. Buck wrote:
Eiffel and Objective-C are at opposite extremes of the OO spectrum.
I've slowly figured that out =)
Eiffel's philosophy is that absolutely everything must be known before any
coding can begin and then nothing can ever change.
I don't think I would characterize it as such, but it sounds like you know
better than I on this subject. For me, it seems that Eiffel is about
static typing, and Obj-C is about dynamic typing as much as possible. Many
of the patterns I see in Obj-C and SmallTalk make a lot of sense to me.
The primary things I like about Eiffel are:
- inherent garbage collection instead of just ref-counting
- design-by-contract and the associated pre-conditions, post-conditions and
invariants
- MI that actually seems to work
- fine grain export of methods/features
- a seemingly well thought out implementation of genericity
- static type checking
- emphasis on "total system" instead of just language syntax. Eschews
archaic ideas like "header files" and "forward declarations".
However, I still think I "get" Obj-C more than I get Eiffel. I also think
that Obj-C is more practical in the real world, but without becoming too
held back by compatibility with C (unlike C++).
At this point, I'm leaning towards Obj-C, so my primary concern is
portability to a real server environment (i.e. cheap Intel box running
FreeBSD or Linux). I don't want to implement the server on X and then find
out much later that getting it deployed will be a nightmare. Memory
fragmentation is actually a very significant concern of mine, especially
given Obj-C's reliance on dynamic allocation. Does the memory manager
handle compaction behind your back? At first glance, it would seem capable
of this because you can't do pointer arithmetic on id, so a reference's
destination should be moveable without undue problems?
So, portability is my biggest issue: any advice on that?
Brian