• 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: Is pointer syntax logical?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is pointer syntax logical?


  • Subject: Re: Is pointer syntax logical?
  • From: "Juan Nunez-Iglesias" <email@hidden>
  • Date: Thu, 26 Jul 2007 03:11:46 -0700

So my question is why the syntax for pointers looks like it does. Is there any logical explanation.

Hey Bob,

I've felt the same way since I first learned C years ago. As far as I
can see the only benefit to writing in K&R(& everyone else) style is
when declaring variables serially, e.g. int i = 0, j=0, *a, *b; But I
always actually put the little star next to the type, ie int* a, * b;
Makes more sense to me, and it's perfectly correct.

Alternatively you could develop in C++ where you can use references
and make rare use of pointers. But in Cocoa it's pointers all the way.

Juan.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Is pointer syntax logical? (From: Bob Ueland <email@hidden>)

  • Prev by Date: Re: NSUserDefaults for another Application
  • Next by Date: Re: Is pointer syntax logical?
  • Previous by thread: Is pointer syntax logical?
  • Next by thread: Re: Is pointer syntax logical?
  • Index(es):
    • Date
    • Thread