473,396 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Object-Oriented Programming With C

152 100+
Hello to everybody!

The purpose of this thread is to look at your opinions about the different techniques developed that aim at object-oriented programming with the C Programming Language.

I want your opinions and your suggestions (personal experience) about which one is the best, if it worths (or is just to follow the trend) and other links.

I am currently using the techniques developed by Axel-Tobias Schreiner (which were used by the Plan 9 project) and i found them very very good and easy to use.
On the other side, the GObject system is not so robust in my opinion and hard to use.
If you have another "API" that you find better please let me know!

Please tell me your experience (or personal opinion) about this subject. I would appreciate it.

Thanks for your time!
Jan 11 '09 #1
3 1475
JosAH
11,448 Expert 8TB
Hi,

you might have a look at "Objective C"; it is a little known language outside the Apple world but I find it quite an elegant language. If you really look you can see a couple of Java ideas shining through (but Objective C was first ;-) There's a GNU port of the NextStep library/runtime system, named GNUStep.

kind regards,

Jos

ps. Google gets you started.
Jan 12 '09 #2
Tassos Souris
152 100+
I am aware of the Objective C language...
my purpose is not to learn another OO language that is similar with C but to use C for that purpose (in pure standard format)...

From what i searched in google there are the techniques i mentioned in the first post and some excellent articles in the Sun Microsystems site (which unfortunately do not form a consinstent style).

I just want the experience from those who have tried such techniques to hear some opinions about their usage cause i cannot find anywhere in the net a similar topic (for a subject that has over 16863 projects in SourceForge, implemented by the GNOME project and so many articles)!
I just cannot find any real experience in the internet.. that's basically what i am looking for.. :-) I
I guess that i will find out my self after years of using such techniques :-) -:) :-)
Jan 12 '09 #3
JosAH
11,448 Expert 8TB
@Tassos Souris
I've been there, done that: if you don't want to use language constructs beyond the C language you're bound to horrible preprocessor constructs and a lot of artifacts you have to type and you don't want to type.

A runtime support library just isn't enough; just look at C++: it started off as a translator from C++ to C; Objective C started off as a separate preprocessor for C and both ended up being separate parsers and code generators; C++ wants to look like C, that's all (and it fails in certain areas as you might've noticed).

If you start off from another 'paradigm' you can get a lot of the OO paradigm for free; e.g. if you have a functional language you have closures and you almost have classes and inheritance for free. All the private/protected hulla baloo is a matter of a language sauce on top of that. There is no magic in OOP but some language constructs come in quite convenient, a convenience pure C can't offer you.

kind regards,

Jos
Jan 12 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
5
by: Matthew | last post by:
I have a nice little Sub that saves data in a class "mySettings" to an XML file. I call it like so: Dim mySettings As mySettings = New mySettings mySettings.value1 = "someText" mySettings.value2...
5
by: Michael Moreno | last post by:
Hello, In a class I have this code: public object Obj; If Obj is a COM object I would like to call in the Dispose() method the following code: ...
16
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.