• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Beginner's questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beginner's questions


  • Subject: Re: Beginner's questions
  • From: Angela Brett <email@hidden>
  • Date: Wed, 17 Oct 2001 11:04:38 +1300

As for the syntax, I can't understand what drives you to using those terrible and unintelligible things like foo.bar(1,2,3,"x",7) instead of extremely legible [foo barWithNumber:1 count:2 size:3 name:@"x" value:7] or so.

Well, I like the legibility too, but if there's one good thing about C++ (if you like C) it's that it is such a natural extension of C syntax - even the name is! The classes are like structs, the methods are like functions, [] is for arrays. Objective-C has all these new things like [object message] and @interface and - funnyLookingMessageImplementationsWith:(Different *)wayOfExpressingArguments. Objective-C also means more typing, since we have to type the names of the arguments, and they can be quite long. I thought at first that would bother me, but I don't mind all the typing since it makes it more legible and also easier to remember what I'm doing while I'm typing it - if I have to look up how to make one of the arguments, I don't then forget where it's supposed to go.

Of course, now I've got the hang of that new stuff, I really like Objective-C, even though I haven't really used its more powerful features yet. Perhaps I only like Objective-C more because I can actually do things with it (I've never written any GUI software in plain C or C++) but nevertheless I'm not saying that C++ is better, I'm just pointing out that the syntax is a more obvious extension of C syntax, and that's probably what drives people to use it. Woah, what a long sentence.

Oh, and while I'm here, I might as well jump on the bandwagon and say that the [ and ] keys are right next to the P on my keyboard... maybe they're elsewhere in non-English-speaking countries or something.
--
Angela Brett email@hidden http://acronyms.co.nz/angela
A mathematician is a machine for turning coffee into theorems -- Paul Erdos


  • Follow-Ups:
    • Re: Beginner's questions
      • From: Ondra Cada <email@hidden>
References: 
 >Beginner's questions (From: Philippe Magdelenat <email@hidden>)
 >Re: Beginner's questions (From: Ondra Cada <email@hidden>)

  • Prev by Date: Undocumented NSString API
  • Next by Date: [ANN] Frame and Bounds article on Mulle
  • Previous by thread: Re: Beginner's questions
  • Next by thread: Re: Beginner's questions
  • Index(es):
    • Date
    • Thread