[vox-tech] objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vox-tech] objective C
Peter Jay Salzman writes:
> i started looking at objective C. to my eyes, the grammar is worlds
> simpler than C++. as far as i can tell, it adds only 1 piece of syntax
> to the C language -- passing a message to an object
> [Object doSomethingWith: anotherObject];
> all the other OO enhancements are simply more keywords. so the syntax
> is pretty much the same as C. people who use it say that objective C is
> a proper superset of C (as opposed to C++).
> has anyone here used objective C? it looks really interesting.
I have, and it is.
It's basically C plus OO classes. It's good if you want C, and want
objects (without having to fake 'em), but don't like various things
about C++ (e.g., references, lack of strictly defined behavior on
casting char* to unsigned char* or vice-versa, C++ iostreams'
inability to repoen a text stream as binary, Stroustrup's massive
It's C with just a *little* OO sugar. One thing that C++ benefits from
that neither C nor Objective C have is templates, and the Standard
Template Library, which can be quite handy sometimes. While still a
horribly screwy mechanism with compared to more elegant, and even more
general equivalents such as Ada's, it provides much better
generalization than C can manage with (say) macros.
Lest anyone try to determine my stance from my comments above, let me
state that I really am language-agnostic for the most part. C is
really my favorite language, if for nothing else than having spent
more time on it than on any other language. It is a horrible language
in may respects - but it never gets in your way, unlike most other
languages I've known. C++ has added a lot of elegance to C, and about
an equal amount of its own brand of horribleness as well. Which one I
use depends a lot on what I'm doing. When being able to work somewhat
closer to the problem using OO classes, the STL and other abstraction
techniques is strong enough to outweight the control freak in me that
just loves to use C for everything, well I use C++.
I'd probably use Objective C more, except for the fact that it has no
true standard (though it must have a spec, somewhere), and isn't
as widespread as either Objective C or C++.
vox-tech mailing list