• 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: why Obj-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why Obj-C


  • Subject: Re: why Obj-C
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 8 Apr 2002 18:28:41 -0700

On Monday, April 8, 2002, at 06:12 PM, Matthew Johnson wrote:

Michael Gersten wrote:

Why are we forced to learn yet another syntax that is very alien to
C++/Java. I absolutely love the interface builder its

Just a quick question: Why do you think the syntax is alien?

The use of ['s mainly turns my stomach. And I bet people who don't actually have to learn Obj-C are put off by them too.

Funny, I have exactly the same reaction to the double colon, and the "->" being used for anything other than dereferencing to reach a structure member through a pointer.

Using a function style (C style) would make Obj-C more likely to be given a chance by busy programmers.

Back when I first learned Obj-C, I was of the opinion that C++'s method call syntax was better(which it's not) because it was more in the style of C (which it is). What changed my mind was realizing that Obj-C expressions can *nest*, as in:

foo = [[MyClass alloc] initWithSomeOtherObject:[OtherClass randomObject]];

-jcr


John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re(2): why Obj-C
      • From: Jens Bauer <email@hidden>
    • Re: why Obj-C
      • From: Ondra Cada <email@hidden>
References: 
 >Re: why Obj-C (From: Matthew Johnson <email@hidden>)

  • Prev by Date: Re: why Obj-C
  • Next by Date: Re: why Obj-C
  • Previous by thread: Re: why Obj-C
  • Next by thread: Re: why Obj-C
  • Index(es):
    • Date
    • Thread