

Creating a Blocks-Based Object System - bensummers
http://www.mikeash.com/?page=pyblog/friday-qa-2009-10-16-creating-a-blocks-based-object-system.html

======
swannodette
Great piece of hacking. Can't wait to see what kinds of amazing things develop
from such a simple addition to C.

~~~
jrockway
I am confused as to what is amazing here. GTK+ has had its own C-based OO
system for years, and it doesn't require any extensions. (It is better in some
ways and worse in some ways than the system described in the article.)

Honestly though, if your problem is complicated enough to need objects and
blocks, and you are using C, you probably picked the wrong language. C is for
the critical sections of video decoders, not for entire applications.

~~~
swannodette
Er. While I don't think that all applications should be constructed using C
(I'm a fan of Clojure, JS, Python), clearly Apple'c choice of going with C (or
a minor variation of C, Objective-C) has paid off in spades.

By innovating on C they have a fairly expressive and extremely performant
application language. By adding blocks Apple has added a useful higher level
construct as well as an excellent tool when writing concurrent applications
without the burden of locks.

Considering the fact that the iPhone is largely built on C, I would hardly
call it the "wrong language for entire applications".

~~~
jrockway
Wow, that's some pretty tasty kool aid there...

One product didn't fail from using C, so it's a good idea in general? I think
the iPhone's success is due to marketing, exploiting developer's existing
knowledge, and good libraries... not the use of C.

~~~
swannodette
If by one product you mean every machine running OS X - 40 million phones plus
10-20 million computers (if not much more) I'd say that's pretty tasty kool
aid.

In anycase it doesn't sound like you've done much Mac OS X programming, so
you're just blowing smoke.

~~~
jrockway
I just don't buy the argument that users == good software. See also: PHP.

Anyway, there's no point in arguing about this if you aren't going to say
anything technical. OS X has users; yeah, I know. That doesn't say anything
about Objective C other than that it is minimally effective. (I use an OS
written in C. The programs crash all the time for no reason.)

~~~
dchest
Sorry for a personal note, but... "C is for the critical sections of video
decoders, not for entire applications?" PHP is bad software?

And you are the one who calls others kool-aid drinkers here? In my opinion,
these are absolute statements that have no substance.

~~~
jrockway
OK, but it only means that you don't know much about C or PHP.

