type identifier and OO design

L

Laurent Deniau

I know that everything related to OO is off topic here, but...

I am designing a framework which allows to do OO in pure C, called COS
(stands for 'C Object System' inspired by CLOS and Objective-C) and it
will be mainly addressed to C users (publicly available) with idioms as
close as possible to those of C. One thing which is highly subjective is
identifiers' names, and one of the most used identifier is the type
identifier of objects.

Objective-C uses 'id' as a generic object type. I find this identifier
too short and pretty common, and since COS is fully written in C (it is
not another language), it could collide with a lot of existing libraries
headers. Since the OO code is growing significantly, it's time for me to
fix this type identifier.

Up to know I am using 'obj' and I am happy with it, but I am not sure
that it will be accepted widely. Here is a list of some alternatives I
was thinking about (open):

obj // actually, used
OBJ // not so bad alternative
object // too common, may collide a lot.
Object // not possible, already used by class Object.

I would like something short since the type is very common in COS, think
about something like 'my', 'var', 'let' in some scripting languages. And
I don't want the trailing _t to mention that it's a type (like FILE).

What would be your preference (justification would be a must)?

To avoid newsgroup pollution, I would recommend private answers.

Thanks,

a+, ld.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top