Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming Apple

Objective-C Comes of Age 437

New submitter IdleThoughts writes "Sometimes it takes a long time to spark a revolution. Long the ugly duckling of programming languages, iOS' Objective-C passed C# in the 'TIOBE Programming Community Index this month and seems on a trajectory to overtake C++ in the next few. It was invented in the early 1980s by Brad Cox and Tom Love, with the idea of creating 'Software Integrated Circuits' and heavily influenced by Smalltalk — yet another legacy from Xerox PARC, along with desktop GUIs, ethernet and laser printers. It was adopted early on by Steve Jobs' NeXTStep, the grand-daddy of all that is now OS X. It had to wait, however, for the mobile device revolution to have its day, being ideally suited to the limited resources on portable devices. It's still being actively developed by Apple and others, sporting the new automatic reference counting and static analysis in the Clang compiler. It turns out it has supported dynamic patching of code in applications all along. What more surprises does this venerable language have up its sleeve?"
This discussion has been archived. No new comments can be posted.

Objective-C Comes of Age

Comments Filter:
  • Yes but (Score:2, Insightful)

    by Anonymous Coward on Friday May 11, 2012 @01:49PM (#39969593)

    Its recent success has obviously been tied to one gigantic hit platform, for which it is the only natively supported PL.

  • by aaaaaaargh! ( 1150173 ) on Friday May 11, 2012 @01:53PM (#39969691)

    Look, I understand that people who use their tools daily want to advertise them and it's a goosd thing if you like what you're using, but let's face it: Objective-C is just another unsafe, hopelessly outdated extension of C as C++. It's great to get things done and sucks less than C++, but it's not in any way a modern language nor is it based on a great language design.

    Before people start flaming me, please consider that programming languages are tools and you choose the right tool for the right purpose and platform, and the availability of libraries is often more important than the language itself. There is no doubt that Objective-C has its place and is useful, just don't try to sell it as the latest great new thingy. Even Apple's own old Dylan was a more interesting and innovative as a language than Objective-C.

    My 2 cents. Now let the language flamewars commence.

  • TIOBE Index (Score:5, Insightful)

    by PCM2 ( 4486 ) on Friday May 11, 2012 @02:02PM (#39969835) Homepage

    Seems like every few weeks someone writes another story about the amazing "trends" in the TIOBE Index. As far as I can see, the real trend is: Languages go up in popularity, they go down, they move around, one month it's the First! Time! Ever! that a language has made the list, the next month it's gone again, and C, C++, and Java are always at the top (in varying order). Such variable results suggest that TIOBE's sampling method isn't all that reliable or accurate to begin with, but I think we all have a pretty good idea what languages people are really using and for what.

  • Re:New features (Score:5, Insightful)

    by gwking ( 869658 ) on Friday May 11, 2012 @02:07PM (#39969937)
    You don't need Xcode to use Obj-C. Clang and gcc are open source and you can use them on Linux and Windows. You can even use clang in Visual Studio! If you mean that you want to develop OS X or iOS applications then yes, you should at least have one of those around to test on. And please hold any more complaints about Xcode being Mac-only until MS releases Visual Studio that isn't Win-only.
  • by cpu6502 ( 1960974 ) on Friday May 11, 2012 @02:08PM (#39969971)

    Don't you mean the "daddy" of OS X? I thought OS X *is* the Next OS but overlaid with the Mac desktop.

    Also why is it called iOS Objective C? Is objective-C only available through Apple?

  • by Electricity Likes Me ( 1098643 ) on Friday May 11, 2012 @02:13PM (#39970091)

    This seems more likely to be due to the easy money currently seeming to be in iOS apps. It's a big installed base, there's a delivery system, and the consumers have been trained to expect to pay some money for just about everything on it (whereas the usefulness of free 'droid apps generally seems to be way higher - in my, admittedly limited, experience).

    I mean, if you have an idea, then the thing you want to do is try and get a few hundred thousand people to buy it for a $1, so that's what everyone is currently doing. I don't think it really says anything beyond that.

  • by maccodemonkey ( 1438585 ) on Friday May 11, 2012 @02:22PM (#39970263)

    Before people start flaming me, please consider that programming languages are tools and you choose the right tool for the right purpose and platform, and the availability of libraries is often more important than the language itself.

    Not only does Objective C have an extremely rich set of libraries from both Apple and the community (UIKit and Foundation are arguably the best mobile development APIs out there), but Objective C is compatible with all C and C++ libraries.

    So I'm not exactly sure what the point is. I suppose if you have to use a C library one could say "Well see, you have to use C anyway!". But at least for me, the important part is while I'm using C, I'm still encapsulating that code in Obj-C.

  • by SuperKendall ( 25149 ) on Friday May 11, 2012 @02:23PM (#39970287)

    Objective-C is just another unsafe, hopelessly outdated extension of C as C++.

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure - mostly you are never using C arrays or the like. Just because they are there does not make the language inherently "unsafe" if that's not how real people use the language.

    consider that programming languages are tools and you choose the right tool for the right purpose and platform, and the availability of libraries is often more important than the language itself.

    Objective-C currently has some of the most advanced libraries for any platform. It already had great string support and other strong frameworks even before iOS, but with iOS and the Mac taking off the framework support for really advanced animations, database work, networking, etc. as good as or better than any other platform. I came from a Java world and am missing nothing for libraries... not to mention a really good set of open source libraries that offer other abilities in addition to the core frameworks.

    In fact, I would go so far as to say the range and quality of design of the frameworks are THE reason to use Objective-C.

    People like you just look at when Objective-C was developed and think because of its age it cannot be "modern". What you don't realize is that Objective-C was developing over all that time, just in a fairly parallel path to other languages - I like to refer to it as a "Steampunk" language. It is modern but just not quite the same as other things you are used to, coming from an alternate reality.

    You're going to have to come up with real reasons for Objective-C not being "modern", most of which are probably quite out of date by now. Before we can flame you, there need to be specifics which we can skewer...

  • by Anonymous Coward on Friday May 11, 2012 @02:30PM (#39970435)

    When I evaluate a language the first thing I do is look at a random block of code and say to myself is this what I really want to be writing?

    When I look at lisp all I see is endless streams of ()()())))) and my brain instantly reboots in a violent seizure.

    jquery would be a decent system if only I could get over the rediculous hackish syntax needed to workaround underlying JS environment.

    ASP and close neighbors were always a turnoff due to the weird escape sequences you needed to plaster absoultely everywhere more recently razor cleaned that up somewhat.

    Objective c has too many perlish @ symbols and a rediculous number of [] [][][ ][][][] [] contraptions all over the place. I know this sounds and is shallow but when I look at code I really need to see the code not have to look under layers of syntatic nonsense existing only for convenience or compatibility/interop purposes.

    Give me a capable clean language not hacks upon hacks.

    Given enough time any language can be made useful... this does not mean I would ever willingly choose to use it. I'm instantly wary of languages with only one killer app (iphone) unless it is heavily domain specific.

  • by Anonymous Coward on Friday May 11, 2012 @02:32PM (#39970471)

    Notice how bonch, a notorious shill for corporations such as Apple and Microsoft and with an openly anti-google agenda, happens to post a verbose comment, with source code examples and all, right at the exact same time this piece of Apple propaganda is published on slashdot.

    The asterisk next to his name means he's a subscriber, dumbass. Subscribers see articles before non-subscribers. You can write a reply in the box and submit it when the story goes live.

  • Re:Yes but (Score:5, Insightful)

    by maccodemonkey ( 1438585 ) on Friday May 11, 2012 @02:36PM (#39970549)

    And just like iOS, it's impossible to do an Android app without using Java. Sure, just like iOS, there are abstraction toolkits, support for C/C++, etc. But you can't do an Android app without Java.

    Yet I didn't see any complaining about Google forcing "Java vendor lock in" in your posts, and complaining about that being unfair.

  • by gestalt_n_pepper ( 991155 ) on Friday May 11, 2012 @02:39PM (#39970615)

    I mean, that's the simple explanation. If Apple wasn't having a resurgence, would anyone be paying attention to Ojective-C?

  • by Anonymous Coward on Friday May 11, 2012 @02:40PM (#39970635)

    Why do you claim it is "unsafe"? Almost all work done in Objective-C is very "safe", by any measure - mostly you are never using C arrays or the like. Just because they are there does not make the language inherently "unsafe" if that's not how real people use the language.

    There is a common consensus in the CS community that pointers as opposed to references, pointer arithmetics, direct type conversion ("memory overlays") etc. are unsafe, and a language that makes it easy to use them is "inherently unsafe". (That doesn't have anything to do with actual programming practise. Obviously, you can write "safe" programs in any language, even in machine code, as long as you're very careful.) As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

    As for "modern": Perhaps you haven't seen any modern programming languages yet? Because otherwise you should know what I mean. Relatively modern features are e.g. automatic type inference, automatic parallelism, contracts, a concurrent garbage collector -- things like that.

  • by SuperKendall ( 25149 ) on Friday May 11, 2012 @03:35PM (#39971505)

    There is a common consensus in the CS community that pointers as opposed to references, pointer arithmetics, direct type conversion ("memory overlays") etc. are unsafe

    In ObjectiveC we are really using objects more as references than as pointers.

    Basically you come off here as just being afraid of something because you've been told it's scary, not because you've seen real issues.

    As a comparison, take Ada, Eifel, Java, Haskell -- these are all much safer.

    Exactly my point, As I said, I was a Java programmer (for almost a decade) - Objective-C is not really less safe at this point in practice. I say that in terms of stability and in terms of memory use (since you still do not say what you mean by "safe" and the world offers many perils).

    As for "modern": Perhaps you haven't seen any modern programming languages yet?

    Snark alert. As I said, I used Java for a LONG time. Before that I knew better languages still, Scheme and other things... Perhaps you have not worked with enough different languages to know what is really "safe" and what is not.

    Because otherwise you should know what I mean.

    I don't automatically agree with snobs.

    Relatively modern features are e.g. automatic type inference, automatic parallelism, contracts, a concurrent garbage collector -- things like that.

    You're still using a garbage collector? Do you watch that operate while gnawing on woolly mammoth bones or what? ARC is a far superior approach as it involves no overhead.

    As for contracts... you really don't know Objective-C at all, do you?

    You just come off as some ancient CS grad-school twat totally removed from real world programming. I've worked on large systems for multi-national corporations, and now on mobile applications used by millions of people. I don't automatically assume anything anymore, as experience I have found teaches you a lot more than mere theory or some summary of a language you have read on a blog.

    Don't judge any language until you've tried to solve real problems with it.

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...