Re: Callbacks in C libraries
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.