Linked by Thom Holwerda on Fri 14th Mar 2008 20:29 UTC, submitted by Philippe Mougin
General Development The Mac and iPhone SDK are based on the Objective-C programming language, a surprising alliance of C and Smalltalk. Features such as meta-classes, message sending, dynamism, C compatibility, etc., contribute to define the development experience on Apple's platforms. Here is a little list of things that, in Philippe Mougin's experience, contribute to make Objective-C a powerful and fun programming language.
Thread beginning with comment 305061
To read all comments associated with this story, please click here.
objectively yuck?
by pooo on Fri 14th Mar 2008 22:16 UTC
pooo
Member since:
2006-04-22

I will start by saying that I have not used objc much beyond just looking at some examples and reading some docs but, from what I've seen, the syntax itself seems like a very nasty and freakish hybrid of C and god knows what (anyone who knows Cadence's skill, like that). From the feature list it sounds like a modern language but unlike other modern languages (Python, Ruby, Java, etc) the syntax seems anything but elegant and intuitive.

Any serious objc guys who also know Ruby/Python well care to compare/contrast objc on this front? I could be wrong but my first reaction was Oh GOD! NO! NO!

Reply Score: 2

RE: objectively yuck?
by renox on Fri 14th Mar 2008 22:28 in reply to "objectively yuck?"
renox Member since:
2005-07-06

I will start by saying that I have not used objc much beyond just looking at some examples and reading some docs but, from what I've seen, the syntax itself seems like a very nasty and freakish hybrid of C and god knows what


Well I'm not a God but I do know the other language: Smalltalk!

Smalltalk has a very simple syntax, but as it's very different from everything else, it takes some times to get used to it..
That said, I remember that when I was at school, I disliked a lot Smalltalk's 'weird' syntax, but after the more I use monster-languages like C++ or Perl, the more Smalltalk's simple syntax seems atractive :-)

Reply Parent Score: 7

RE: objectively yuck?
by g2devi on Fri 14th Mar 2008 22:43 in reply to "objectively yuck?"
g2devi Member since:
2005-07-09

True. The syntax is a bit off-putting to me too, but you might want to consider the following:
* Objective-C was the first Object Oriented version of C and is still widely used.
* Despite being about as powerful as C++, it's *a lot* easier to learn since it only adds a handful of features.

Back in the old C++ version 1.0 days, I cringed at the Objective-C syntax. But as I watched C++ evolve from a nice simple language to C++ version 2.0, which had some warts but was generally okay, to the PL/1-wannabe called ISO C++ (which only recently has a full implementation and has behaviours that still surprise it's creator), I'm struck by how favourably Objective-C stacks up with C++. This is despite being virtually unchanged since the early days.

I sort of wonder whether Java, JavaScript, and C# would have even been invented if Objective-C won the hearts and minds of the Object Oriented C devotees. If this happened, I speculate that, SmallTalk might have been the language of the Web (definitely has fewer warts than Javascript), Small-Talk would have taken Java's place, and Objective C over a Small-Talk VM might have taken C#'s place.

Edited 2008-03-14 22:54 UTC

Reply Parent Score: 5

RE[2]: objectively yuck?
by whartung on Fri 14th Mar 2008 23:11 in reply to "RE: objectively yuck?"
whartung Member since:
2005-07-06


I sort of wonder whether Java, JavaScript, and C# would have even been invented if Objective-C won the hearts and minds of the Object Oriented C devotees.


NeXT brought Obj-C to the masses in 1988. Here it is, 20 years later (well, 19 to be pedantic as we got 2.0 last year) and we're just now getting garbage collection. There have been 3rd party GC systems for C forever (Boehm instantly comes to mind), but Obj-C 2.0 will make it wide spread, at least in the Mac community. And it's been almost 20 years for that to happen.

Three things brought Java to prominence: GC, the JVM (and its portability), and its syntax (being shared with C and C++).

Obj-C had until last year, none of those attributes.

And, to be frank, thank heavens for that. Not to slight Obj-C, but the real gift that Java brought us is the JVM and all of the research necessary to make it perform. If Obj-C had taken off, we'd still be bound to the CPU and portability by source code rather than what we have today. JIT technology would be a niche and not mainstream.

If any system has brought the idea of "software components" to maturity, it's Java. It is painless to use Java libraries today, on any platform. It is painless to build most of them. The JVM provides all of that. Beyond the rare conflict of running a later version binary on an older JVM (Java 5 on a 1.4 JVM for example), Java has more software reuse than any other system on the planet.

I can't see how Obj-C could have brought upon us the age of software that we have now. And mind, I don't mean just Java. But you can see the principles developed and improved upon by systems like .NET, as well as the number of languages targeting the JVM and the CLR. Not to mention projects like Parrot.

If Obj-C had "taken over" and Java floundered, I strongly suspect we wouldn't have the Brave New World that we have today and it would have, in fact, held us back -- without really knowing it.

Reply Parent Score: 3