Professional Web Applications Themes

Why Objective-C? - Mac Programming

I understand Objective-C is a heritage from the NextStep time (correct me if I'm wrong) But why should we use it now in 2004? Objective-C seems dead (whas is ever alive?) on every platform except OS X We live in a world were Apple struggles for it's life and the last thing we needed was a dead language (Apple did get rid of it's Pascal heritage just to do it over again) What I mean is that developers wants to write software on their favorite platform but not to any price. With C++ you can do anything that Objective-C does ...

  1. #1

    Default Why Objective-C?



    I understand Objective-C is a heritage from the NextStep time (correct me if
    I'm wrong)

    But why should we use it now in 2004?

    Objective-C seems dead (whas is ever alive?) on every platform except OS X

    We live in a world were Apple struggles for it's life and the last thing we
    needed was a dead language
    (Apple did get rid of it's Pascal heritage just to do it over again)

    What I mean is that developers wants to write software on their favorite
    platform but not to any price.

    With C++ you can do anything that Objective-C does and more and it exists on
    every existing platform:
    Mac, Windows, UNIX, etc

    We don't need:
    Objective-C
    C#
    Visual Basic
    Java
    Db

    It just a way to lock programers to a specific platform (well maybe not Java
    and alike but you get the idea)

    Most of us (Mac addicts) write software for severall platforms and it need
    to be as platform independent
    as possible.

    Tell me I'm wrong

    R


    Rolf Guest

  2. #2

    Default Re: Why Objective-C?

    In article <fuapc.59108$telia.net>,
    "Rolf Nilsson" <nu> wrote:
     

    You are neither right nor wrong. You have, however, start a thread that is bound
    to become a pointless religious war. Enjoy... I hope you can find some useful
    information by the time the dust settles.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: Why Objective-C?

    On Fri, 14 May 2004, Rolf Nilsson wrote:

    [snip] 
    [snip] 

    This is such an obvious troll. Try harder next time! If anybody actually
    wants to know about the issues raised, search Google Groups; it's been
    done to death.
    Michael Guest

  4. #4

    Default Re: Why Objective-C?

    Rolf Nilsson wrote: 

    This could be a troll, but I'll try to answer without fueling the flames.
     

    Because it enables very rapid development on Mac OS X.
     

    I don't think there's many developers who left the Mac solely because
    the Mac started supporting Objective-C.
     

    This isn't true. But if you think it is, please go ahead and expose the
    Cocoa libraries to C++. A lot of people would be happy should you succeed.
     

    We don't strictly need anything except a way to enter machine code.
    Each of the languages you mentioned has its strengths and is a good
    choice for certain programs.
     

    It's quite possible to use Objective-C as your front end and any of a
    host of other languages as your back end. But if Objective-C doesn't
    fit your needs, you don't have to use it.
     



    Peter Guest

  5. #5

    Default Re: Why Objective-C?

    seems like these discussions get polemic pretty quickly. this
    particular one doesn't appear to have gotten out of hand yet, so let's
    see if i can keep from making it worse ...

    Rolf Nilsson wrote: 

    apple makes lots of decisions that other companies wouldn't. i'd say
    that, most of the time, that's a GOOD thing, and that most mac users
    consider that sort of daring to be why they are in this camp.
     

    there's always stuff on every platform that exists on no other. you
    can't write windows programs on unix, because it doesn't have the same
    apis. you wouldn't be able to use windows api c++ code unchanged on a
    mac anyway. you're going to have to re-write it, so the fact that the
    new code is in a different language is not all that important.

    also, there really *are* things you can do in obj-c that you can't do in
    c++, at least not without jumping through fiery hoops. obj-c is
    runtime-dynamic, and cocoa takes great advantage of that to facilitate
    inter-object communication. i am not a great fan of the language, but
    it does have many advantages. it emphasizes a very different set of
    priorities than does c++.

    Peter Ammon wrote: 

    i wouldn't say it's obj-c doing that, but rather the cocoa frameworks
    themselves. they are very comprehensive, provide lots of useful default
    behaviors that can be overridden when you need to, and its constituent
    pieces interoperate and cooperate to a much greater degree than in most
    OSes. i don't see how any of this is particular to obj-c, though.
    could have been done in another language.
    Jhnny Guest

  6. #6

    Default Re: Why Objective-C?

    In article <fuapc.59108$telia.net>,
    "Rolf Nilsson" <nu> wrote:
     

    Yet more evidence to support my contention that developing with C++
    damages people from an OO perspective. Merely being Turing Complete is
    not a sufficient language feature. Just for fun, give me the C++ for
    this 4-liner:

    NSSet *myValues = [NSSet set];
    [myValues addObject: [NSNumber numberWithInt: 42]];
    [myValues addObject: "1337"];
    NSLog("One of my values is %d", [[myValues anyObject] intValue]);
     

    Hell, I'll tell you you're a complete idiot.
    Doc Guest

  7. #7

    Default Re: Why Objective-C?

    In article <fuapc.59108$telia.net>,
    "Rolf Nilsson" <nu> wrote:
     

    Because it's good. It's a tool, right? And you pick tools based on their
    suitability for the task, right? Well, Objective-C, in conjunction with
    Cocoa, is a tool that is _highly_ suitable for mainstream desktop
    development.
     

    Happily, what "seems" to be the case to you isn't reality.
     

    False. Dead false.
     

    So does Objective-C.
     

    But they all have different strengths.
     

    Objective-C is not a problem there.
     

    You're wrong. HTH.

    G

    --
    Standard output is like your butt. Everyone has one. When using a bathroom,
    they all default to going into a toilet. However, a person can redirect his
    "standard output" to somewhere else, if he so chooses. - Jeremy Nixon
    Gregory Guest

  8. #8

    Default Re: Why Objective-C?

    In article <nashville.comcast.net>,
    Jhnny Fvrt (it means "halo, then resonate") <com>
    wrote:
     
    >
    > i wouldn't say it's obj-c doing that, but rather the cocoa frameworks
    > themselves.[/ref]

    It's both, largely because the Cocoa frameworks a so reliant on
    Objective-C.
     

    Not well. You could get close in Java, but not dead on.

    --
    Standard output is like your butt. Everyone has one. When using a bathroom,
    they all default to going into a toilet. However, a person can redirect his
    "standard output" to somewhere else, if he so chooses. - Jeremy Nixon
    Gregory Guest

  9. #9

    Default Re: Why Objective-C?

    In article <supernews.com>,
    Doc O'Leary <com> wrote:
     
    >
    > Yet more evidence to support my contention that developing with C++
    > damages people from an OO perspective. Merely being Turing Complete is
    > not a sufficient language feature. Just for fun, give me the C++ for
    > this 4-liner:
    >
    > NSSet *myValues = [NSSet set];
    > [myValues addObject: [NSNumber numberWithInt: 42]];
    > [myValues addObject: "1337"];
    > NSLog("One of my values is %d", [[myValues anyObject] intValue]);[/ref]

    Cruel, Doc.

    --
    Standard output is like your butt. Everyone has one. When using a bathroom,
    they all default to going into a toilet. However, a person can redirect his
    "standard output" to somewhere else, if he so chooses. - Jeremy Nixon
    Gregory Guest

  10. #10

    Default Re: Why Objective-C?

    In article <comcast.net>,
    Gregory Weston <com> wrote:
     
    > >
    > > Yet more evidence to support my contention that developing with C++
    > > damages people from an OO perspective. Merely being Turing Complete is
    > > not a sufficient language feature. Just for fun, give me the C++ for
    > > this 4-liner:
    > >
    > > NSSet *myValues = [NSSet set];
    > > [myValues addObject: [NSNumber numberWithInt: 42]];
    > > [myValues addObject: "1337"];
    > > NSLog("One of my values is %d", [[myValues anyObject] intValue]);[/ref]
    >
    > Cruel, Doc.[/ref]

    Without commenting on the relevant value of C++ vs Obj-C the example is
    not a fair comparison of the two languages.

    Were it not for the Cocoa framework there would be significantly more
    lines of code than the 4 shown.

    Perhaps someone would like to make an example using PPX- I have been
    living in cocoa for the last year so havn't even looked at PPX.

    Anyway language wars are futile. Use whatever you like.

    respect...

    Peter
    Peter Guest

  11. #11

    Default Re: Why Objective-C?

    In article <comcast.net>,
    Gregory Weston <com> wrote:
    <snip> 
    >
    > So does Objective-C.
    >[/ref]
    Unfortunately the Cocoa framework does not exist on every platform as
    far as I know. And trying to develop without it is just as difficult as
    using C++ without PPX or MacApp or (shudder) MFC (or whatever they use
    over there these days) <puts on peril sunglasses>.

    I certainly find Obj-C + Cocoa a powerful tool set and it's a lot of fun
    to develop in as well. But at this point in time it's a Mac only
    combination as far as I know.

    respect...

    Peter
    Peter Guest

  12. #12

    Default Re: Why Objective-C?

    Doc O'Leary <com> wrote:
     
    >
    > Yet more evidence to support my contention that developing with C++
    > damages people from an OO perspective. Merely being Turing Complete is
    > not a sufficient language feature. Just for fun, give me the C++ for this
    > 4-liner:
    >
    > NSSet *myValues = [NSSet set];
    > [myValues addObject: [NSNumber numberWithInt: 42]];
    > [myValues addObject: "1337"];
    > NSLog("One of my values is %d", [[myValues anyObject] intValue]);[/ref]

    That's unfair, because it's not really a 4-liner. Someone wrote the NS
    framework that lets you use only 4 lines to do what you've done. The
    question then becomes one of whether you're comparing the languages or
    the framework.

    Here's a more purely language-oriented challenge (the one -intValue
    relies on, so it's not that different from yours in spirit):

    id tellTheObjectToDoTheMethod (id anObject, SEL aMethod)
    {
    // substitute 'perform:' as needed.
    return [anObject performSelector:aMethod];
    }
    Paul Guest

  13. #13

    Default Re: Why Objective-C?

    Peter Teeson <com> wrote:
     

    You're not exactly wrong, but you're not exactly right, either.

    <http://www.gnustep.org/information/aboutGNUstep.html>
    Paul Guest

  14. #14

    Default Re: Why Objective-C?

    In article
    <bloor.is.net.cable.rogers.com>,
    Peter Teeson <com> wrote:
     

    It's perfectly fair.
     

    Use the STL all you like. Nothing about the code I gave has to do with
    object libraries, but rather language fundamentals. Templates do not a
    container make, and user defined types are not the same as objects. The
    core things to take away from my example is that you can use untyped
    containers, and you can call methods polymorphically on its contents.
     

    Indeed, there truly is no accounting for taste.
    Doc Guest

  15. Moderated Post

    Default Re: Why Objective-C?

    Removed by Administrator
    Doc Guest
    Moderated Post

  16. #16

    Default Re: Why Objective-C?

    In article
    <bloor.is.net.cable.rogers.com>,
    Peter Teeson <com> wrote:
     
    > >
    > > So does Objective-C.
    > >[/ref]
    > Unfortunately the Cocoa framework does not exist on every platform as
    > far as I know.[/ref]

    Cocoa doesn't, but GNUstep - modeled on it - is highly portable. As a
    result, Foundation code is actually more portable that PowerPlant or MFC
    or MacApp.

    G

    --
    Standard output is like your butt. Everyone has one. When using a bathroom,
    they all default to going into a toilet. However, a person can redirect his
    "standard output" to somewhere else, if he so chooses. - Jeremy Nixon
    Gregory Guest

  17. #17

    Default Re: Why Objective-C?

    In article <supernews.com>,
    Doc O'Leary <com> wrote:
     

    Based on the terms of your example, can be my complete c++
    implementation of Adobe Photoshop:

    int main()
    {
    CPhotoshopApp theApp;
    theApp.Run();
    return 0;
    }

    Wow, c++ must be a superior language!!!!!!!!!

    Congratulation on proving you don't have a clue. :)
    Chris Guest

  18. Moderated Post

    Default Re: Why Objective-C?

    Removed by Administrator
    Chris Guest
    Moderated Post

  19. Moderated Post

    Default Re: Why Objective-C?

    Removed by Administrator
    Miro Guest
    Moderated Post

  20. #20

    Default Re: Why Objective-C?

    Cuz it's awesome! Having used many other languages (C, C++, Java,
    REALBasic, Fortran, perl, etc.), Objective C is by far my favorite.

    Old doesn't always mean bad - even in the computer world.


    heliosnorf Guest

Page 1 of 7 123 ... LastLast

Similar Threads

  1. Objective C -> C
    By Bruce Coughlin in forum Mac Programming
    Replies: 6
    Last Post: September 7th, 03:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139