• 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: Callbacks in C libraries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Callbacks in C libraries


  • Subject: Re: Callbacks in C libraries
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Sun, 15 Jun 2003 11:30:33 +0100

On Sunday, June 15, 2003, at 04:59 am, Andrew Pinski wrote:

This is a GNU extension called functions inside functions.
A number of different languages support this but ISO/ANSI C does
not, Pascal is one though.
There really is no standard Objective-C so this could considered
standard Objective-C but I would not recommend it as it is bad practice
as it requires gcc.

I don't think using GCC extensions is bad practice; that would only be true if GCC was non-portable and you needed to write portable code. OK, if you have some requirement that your code has to build on another compiler as well as GCC, then it might be a problem... but that is a special case, probably (in the specific case of ObjC) applicable to Apple's example programs and not a great deal else.

As far as Objective C goes, personally I think the language *should* include nested function support, because it's so useful; in fact, I'd argue the same for C and C++. Also, since GCC is arguably the de-facto standard implementation of Objective C (given that NeXT/Stepstone's compiler is no longer with us), it'd make sense for other implementations to add some of GCC's more useful extensions...

Kind regards,

Alastair.
_______________________________________________
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: Callbacks in C libraries
      • From: Eric Shepherd <email@hidden>
    • Re: Callbacks in C libraries
      • From: Eric Shepherd <email@hidden>
References: 
 >Re: Callbacks in C libraries (From: Andrew Pinski <email@hidden>)

  • Prev by Date: NSTextView and indenting it...
  • Next by Date: Re: [ANN] NSTableView Assistant
  • Previous by thread: Re: Callbacks in C libraries
  • Next by thread: Re: Callbacks in C libraries
  • Index(es):
    • Date
    • Thread