Brilliant and magnanimous Apple team adds closures ("blocks") to C (8)

1 Name: #!/usr/bin/anonymous : 2008-08-30 21:03 ID:X5UOLtZe

Both GCC and Clang, though the code is still relatively untested.

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-August/002670.html

Obviously, this is extremely non-standard, but check this out:

http://en.wikipedia.org/wiki/C_(programming_language)#C99

> The C standards committee has adopted guidelines to limit the adoption of new features that have not been tested by existing implementations.

So there's a chance Blocks could make it into C1x.

2 Name: #!/usr/bin/anonymous : 2008-08-30 23:25 ID:e5yfsQom

Isn't this called Objective C?

3 Name: #!/usr/bin/anonymous : 2008-08-31 00:34 ID:X5UOLtZe

>>2
Closures not objects. Presumably, Apple wanted closures in Objective C, but the languages are similar enough that making the feature available from plain C was trivial.

4 Name: #!/usr/bin/anonymous : 2008-08-31 15:06 ID:Heaven

shit syntax, and no, it won't make it to the C1x standard.

5 Name: #!/usr/bin/anonymous : 2008-08-31 20:18 ID:Heaven

Yeah, I think it's unlikely they'll show up in C1x, but not because of the syntax, but because of the reliance on some underspecified allocator and mmu protection bits problems.

6 Name: #!/usr/bin/anonymous : 2008-09-02 15:52 ID:mdF4rh+3

>>3

Closures are SORELY needed in Objective-C! This is great news on that front.

7 Name: #!/usr/bin/anonymous : 2008-09-08 03:56 ID:Heaven

The syntax does look really painful, though it could just be the fever and alcohol and lack of sleep... (And does it even make sense to have this in plain old C?)

Anyone in this thread read Stes' 1998 proposal for Obj-C? (It's not comparable, since it didn't deal with C, but anyway.)

8 Name: #!/usr/bin/anonymous : 2008-09-19 12:40 ID:xjlCEQTJ

C1X you say! I can hardly wait until 2019 rolls around.

This thread has been closed. You cannot post in this thread any longer.