Re: Cocoa approachable by non-programmers ?
Re: Cocoa approachable by non-programmers ?
- Subject: Re: Cocoa approachable by non-programmers ?
- From: MarketLogix Developer <email@hidden>
- Date: Mon, 24 Feb 2003 06:51:28 -0800
On Sunday, February 23, 2003, at 08:24 PM, Denis Stanton wrote:
I'm attempting to learn Objective-C without previously using C.
No can do Dennis, ObjC is "merely" C with only one extension to the
language, the
message/messenger. Here, I say "merely" as a good thing. Many, myself
included,
feel that this is ObjC's major strength over C++ which is a will-nilly
grab bag of
preprocessor "enhancements" which achieve not quite the same goals
with much
greater toil. Here, I say "enhancements" like they are not such a good
thing.
I began programming in Fortran IV at University. They said Algol 68
(yes, thats 1968) was the future of programming, but when I got a job
in the real world it had to be Cobol. I spent 20 years in the Cobol
world and had brief encounters with RPG, Snobol, Lisp and Small (Algol
derivative, not smalltalk). Later I taught myself enough Pascal to
write a program that sold for enough to buy my first Mac. (128k RAM,
140k floppy disk, no hard drive, a bargain at #1,395 - $2,000).
Pascal, or maybe Modula II was the way of the future. I co-founded a
software development company, originally Macintosh targeted. We hired
programmers who worked in C, and later C++ but it was no longer my job
to program so C passed me by. I tried a few times, but there was
never time or incentive.
Neat experience. I came along a few years later and had PL/I in
undergrad, then Pascal in grad school. Neither time was my
concentration in
computer anything. But it was after a year or so in the work force
that I became interested in switching to coding. That's when I
discovered that
the real language of commerce was C. That was 1987. At this time the
UNiX market was very shell-oriented and EXPENSIVE and there wasn't
any NeXTStep yet. Many employers were committed to IBM PCs, mine was
one, so now I began coding in PC/DOS using Borland's Turbo-C.
Now, being a self taught programmer I was very undisciplined and did
not tend to think in terms of programming principles. Instead, I was
always
mentally paralleling the phenomena and elements of my industry to
functions and data structures in my code. Since my industry was and
still is
the financial markets, I had a Stock "handing over" dividends, Risk
Reports "listening" for changes in asset values before recalculating
portfolios
and "passing" them off to the file archiver. I discovered a product
by StepStone Inc. that thought like I did, only smarter. It was called
Objective-C.
The big sell was that only one extra piece of syntax needed to be
learned, the method. You know: [thing doWhatSay:orElse:]; You now got
these
structures that not only included functions but could encompass all
the functions and variables of the structures "beneath" them !
You just wrote this slightly different C code and then ran this cool
pre-processor under DOS to change all of your Objective-C code into C.
Then you ran a C compiler on that pre-processed code to build your
executable. It was designed to work with the M$ compiler but with just
a little
hacking, which StepStone helped with, it could work with Borland's
compiler too.
StepStone had this class library called the ICpak 101 Foundation
Classes with container classes and such but never quite succeeded in
producing a
GUI widget library for Windows. It seemed like every time that they
got close, M$ would mutate Windows again. And Windows was really
changing
back in those days. Not just re-window dressing like today. Pardon
the pun.
Well, not too long after, this lil' startup company called NeXT bought
them out and made many key improvements to the language and created
major
class libraries which were really lacking before. The rest, as they
say, is history.
Sorry for the digression but I guess I attempted to show a bit of the
relationship between C and ObjC with a story.
I think the big difference between C and its predecessors is that
languages like PL/I, Cobol and Fortran are structured languages while C
is not
and therefore, considered 2nd generation. With C, data types like
char, short, long and float are more like suggestions than absolute
requirements.
And then we have the pointer. This is C's greatest strength and most
likely the toughest concept to master. But to understand C, master it
you must.
I would prefer to build on my Java experience, but it seems that Java
is very much a second class citizen in the Cocoa world so I'm learning
Obi-C. The problem I encounter is that Obj-C documenters assume they
are talking to experienced C programmers, rather than reluctant Java
converts. I hate it when they say "this is like printf", and nowhere
does it say what "printf" is like.
Yep. When Apple bought NeXT, the AppKit/FoundationKit became Cocoa.
This is the library of interface, communication, archiving, etc, etc,
widgets
that underlies it all. And what came from NeXT was ALL written in
C/ObjC.
There is an argument that says I should learn C first. This is not a
bad idea, but I am aware that I would spend many hours learning to do
things that are given for free with Cocoa.
IMHO, not really much of an argument. ObjC is an OO language extension
to C. Learn at least beginner's level C or die.
Its just not 3GL like basic or 4GL like Java.
I am enjoying Obj-C, despite some agonizingly slow progress through
basic C stuff, but I do wonder if I'm working myself into an obscure
corner with a language that won't help my resume.
This has been the ongoing battle of my career.
So far its on the plus side. But, one thing for sure, you are always
in the minority.
M$/Intel/C++ is the ruling class. You are a member of the resistance.
But the greater the risk the greater the return.
-----------------------------------------------
bisk ~ OSX.2.4
G4 PowerMac Gigabit, Dual 500
Sony SDM-M81 18.1" LCD display
1GB, 40GB, SuperDrive(DVR 105)
-----------------------------------------------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.