[linux-audio-dev] Objective-C (was: gcc, you let me down...)

From: Toby <tobia.conforto@email-addr-hidden>
Date: Mon Jun 06 2005 - 12:07:03 EEST

Tim Goetze wrote:
> I'm pretty much sold on Python as my high-level language of choice and
> very reluctant to diversify in computer language literacy any further.

I feel your pain. Python is by far my favorite language ever. However,
I've recently been looking for an alternative *compiled* object-oriented
language, because let's face it, Python is on average 10 times slower
than C. Sometimes you just can't afford it.

Enter Objective-C:

- STRICT SUPERSET OF C: every valid C program is a valid ObjC program.
  This makes it trivial to include or link to C code and libraries and
  to mix procedural, object-oriented and ASM code in the same *file*.

- SIMPLE: ObjC is plain C with one syntax addition and a few new
  keywords. It only extends the C language to support Smalltalk-like
  object-oriented features, because that's all you're going to need.
  No more operator overloading, templates, references, 'const', etc.

- DYNAMICALLY TYPED: messages (method calls) are delivered according to
  the dynamic type of the target object, not to some static type. This
  is how Python works. You can even send an object a message that is
  not specified in its interface. This might seem like a bad idea, but
  instead it allows for powerful delegation-based design patterns.

- FAST: Objective-C performs dynamically bound message calls very
  quickly, about 1.5-2.0 times as long as a plain C function call!

Objective-C is the language of choice for MacOS X development.
GCC compiles it very well too.

Using GNUstep (optional) as the system and GUI framework, you can make a
GUI program that compiles almost without changes on both GNU/Linux and
MacOS X! (Windows port in the working.)

> > Well I really like to separate C and C++. C is unashamedly a low
> > level language. C++ OTOH tries to be both low level and high level.
> > In comparison to C, C++ is a poor low level language. Compared to
> > Python or Ocaml, C++ is a poor high level language.

Objective-C can be as low-level as C (including #define, ASM...) and as
high-level as Python (albeit a bit more verbose) IN THE SAME FUNCTION!

Toby

-- 
One theory states that if anyone ever learns how to use all of Emacs, it
will instantly disappear and be replaced by something even more bizarre
and inexplicable. Another theory states that that's how VI was invented.
Received on Mon Jun 6 16:15:05 2005

This archive was generated by hypermail 2.1.8 : Mon Jun 06 2005 - 16:15:05 EEST