• 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: Syntactic sugar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntactic sugar


  • Subject: Re: Syntactic sugar
  • From: Ben Lachman <email@hidden>
  • Date: Tue, 5 Sep 2006 01:30:41 -0400

It seems to me that "syntactic sugar" is what programming languages are in reality. They're just more and more useful abstractions of what is actually going on.

But a couple more examples, these from obj-c 2.0:

- "for item in container" syntax
- @property (creates a property that complies with KVC/KVO, etc.

->Ben
--
"If you trust Google more than your doctor then maybe it's time to switch doctors."
- Jadelr and Cristina Cordova



On Sep 5, 2006, at 12:59 AM, Andrew Farmer wrote:

On 04 Sep 06, at 11:49, CoLo0LoGo wrote:
http://en.wikipedia.org/wiki/Syntactic_sugar

Could anyone point me to any documentation of Syntactic sugar used in
Cocoa programming if it is used much in development here ?

A few examples:

* IBOutlet and IBAction are a minor form of syntactic sugar - they're
  both typedef'd as equivalent to void.

* The Cocoa headers define a set of macros (NS_DURING et al) which
  implement exception handling. However, they're now superseded by the
  @synchronized keyword.

* Some programmers - myself included - use a complex macro to implement
a foreach() looping structure.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Syntactic sugar (From: CoLo0LoGo <email@hidden>)
 >Re: Syntactic sugar (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Cocoa equivalent to fputc()?
  • Next by Date: Re: Syntactic sugar
  • Previous by thread: Re: Syntactic sugar
  • Next by thread: Re: Syntactic sugar
  • Index(es):
    • Date
    • Thread