
The C Object System: Using C as a High-Level Object-Oriented Language - jedbrown
http://arxiv.org/abs/1003.2547
======
jfager
I know arxiv is where all the cool kids hang out, but here's the site and the
code:

<http://ldeniau.web.cern.ch/ldeniau/cos.html>
<http://sourceforge.net/projects/cos/>

~~~
mahmud
arxiv is where all non peer reviewed paper authors hangout. Most tolerant
bullshit filter, evar.

------
SandB0x
There's an interesting book called _Object Oriented Programming with ANSI C_ ,
which is on various websites as a PDF. As someone who didn't do computer
science at undergraduate, it explained a lot about how other languages work -
for example why Python passes _self_ (well, self by convention) automatically
to every method.

Edit: It's reference [40] on the paper.

~~~
kqr2
Link to pdf of book:

<http://www.cs.rit.edu/~ats/books/ooc.pdf>

------
andrewcooke
wow. this looks very interesting. the web site says that it's beta. does
anyone have experience / anecdotes about how solid it is? seems like it would
be very useful.

also, what approach does it take to memory management and / or deciding who
owns what? i'm just glancing at the paper now (should really be working) and
the lack of emphasis on that seems worrying - suspect i am missing something?

[edit: replying to myself, the key phrase is "ownership"; see section 2.1:
_Ownership The management of object life cycles requires a clear policy of
ownership and scope rules. In languages like C and C ++ where semantic by
value prevails, the burden is put on the programmer’s shoulders. In languages
like JAVA, C # and D where semantic by reference prevails, the burden is put
on the garbage collector. In this domain, COS lets the developer choose
between garbage collection (e.g. Boehm GC [25]) and manual reference counting
with rich semantic (section 3.5)._ ]

------
kraemate
How is this different or superior to languages like Objective-C and C++ ? Both
provide C like syntax and have similar features as the system described here.

~~~
dfox
1) Objective C certainly does not provide generic functions and I doubt that
Objective C++ does (C++'s static overloading is something completely
different, although it might look similar).

2) And this is different exactly in that it is not a complete language, but a
library of CPP macros and some supporting infrastructure.

~~~
m_eiman
C macros, surely.

~~~
dfox
CPP is "C PreProcessor", so your "C macros" are simply some subset of uses of
"CPP macros". CPP can be (ab)used to preprocess other things than C source.

~~~
m_eiman
_slaps forehead_

I blame my confusion on the .cpp extensions!

~~~
dfox
and this confusion is exactly why I tend to use .cxx for C++ sources

------
arethuza
Wow - I was ready to rant about Xt Intrinsics or something then I had a look
at the article and it actually looks pretty cool.

CLOS features in C - interesting!

------
houseabsolute
My first question about this thing is how "leaky" the abstraction is. If you
frequently have to make allowances for how C is not _actually_ a language with
an object system, that's going to be a problem. But it seems like it should be
possible (with liberal macro use) to make a relatively leak-free abstraction,
and if this is it, that's pretty cool.

------
stcredzero
So, why is this (C as OO lang) a better idea now, as opposed to when it vas
tried in the 80s with X windows?

------
nddrylliog
Interesting =) I'm glad such a project exists. A different approach than
<http://ooc-lang.org/> for sure!

------
dca
Sigh... another golden opportunity to name something the C Object Oriented
Language (cool) squandered.

------
swah
There are also slides packed with the source download on Sourceforge (/doc).

