Like Tree1Likes
  • 1 Post By CornedBee

Objective C

This is a discussion on Objective C within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Is Objective C a variant of C? Why isn't it discussed on this site? I noticed that there aren't forums ...

  1. #1
    Registered User knightjp's Avatar
    Join Date
    Nov 2008
    Location
    Dubai, U.A.E.
    Posts
    15

    Objective C

    Is Objective C a variant of C? Why isn't it discussed on this site?
    I noticed that there aren't forums dedicated to learning it.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,887
    Because either C++ or C is preferred before Obj-C.
    IF you're going to use Obj-C, you might as well use C++
    That's my take on the whole matter.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Except of course if you are writing software for iPhone - in which case Objective C is basically the only choice.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,887
    iPhone is overhyped IMHO. I'll be writing software for Symbian instead in years to come
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Elysia View Post
    iPhone is overhyped IMHO. I'll be writing software for Symbian instead in years to come
    My sentiments too.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    And if you're going to develop for a portable device, Java for years to come :-)

  7. #7
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    504
    Quote Originally Posted by Elysia View Post
    iPhone is overhyped IMHO. I'll be writing software for Symbian instead in years to come
    googling much now,are we?
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Obj-C is a curious language, a spawn of C and Smalltalk, slightly older than C++. (C++ is a spawn of C and Simula.) The main differences between Obj-C and C++ are:
    1) Obj-C's object system doesn't try to meld with C. The syntax is completely different from what a C programmer is used to, giving Obj-C a very weird look overall. C++ tries to meld with the C syntax. The result is better compatibility of Obj-C with older C code (no new keywords, for example), at the cost of weird syntax.
    2) Obj-C is based on interfaces ("protocols") and implementations, with every object on the heap. You have "messages" instead of functions, and I believe the actual action taken upon message receipt is somewhat dynamic. C++ goes the minimal way, by making classes an extension of C structures.
    caroundw5h likes this.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  9. #9
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Obj-C's object system doesn't try to meld with C. The syntax is completely different from what a C programmer is used to, giving Obj-C a very weird look overall. C++ tries to meld with the C syntax. The result is better compatibility of Obj-C with older C code (no new keywords, for example), at the cost of weird syntax.
    AFAIK, isn't Objective-C a strict superset of ANSI C, that is, any ANSI C code is also valid Objective-C code (which cannot be said of C++)?
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,887
    Why does everyone mention ANSI C?
    ISO C is what it is and what it should be. C is not some petty American-only language. It's an international language, as all languages should be.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    AFAIK, isn't Objective-C a strict superset of ANSI C
    I believe it is.

    Why does everyone mention ANSI C?
    ISO C is what it is and what it should be.
    ANSI was faster They standardized it in 1989, ISO in 1990. So C89 is ANSI C, whereas C90 is ISO C.
    (Not that there's any difference.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,887
    Sure, but when ISO standardized it, it means that ANSI should get kicked out of the loop.
    That is why I always refer to it as C90. Internationalization is important!
    So ISO beats ANSI by horse-lengths.
    The best would be if there was no ANSI and only ISO.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C/C++ Objective questions
    By prayami in forum C++ Programming
    Replies: 22
    Last Post: 04-08-2008, 01:58 PM
  2. does anyone here do programming in objective C
    By Silvercord in forum C++ Programming
    Replies: 7
    Last Post: 03-19-2003, 03:48 PM
  3. Objective C
    By Shadow12345 in forum C++ Programming
    Replies: 19
    Last Post: 01-15-2003, 01:40 PM
  4. Programming Objective C in Mac OSX
    By MacUser in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-17-2002, 09:12 AM
  5. gcc and objective c
    By Captain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-13-2002, 04:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21