Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Level of OOPS

Reply
Thread Tools

Level of OOPS

 
 
Vivek
Guest
Posts: n/a
 
      08-20-2003
To what level can we attain object oriententation with the C language?


 
Reply With Quote
 
 
 
 
ArWeGod
Guest
Posts: n/a
 
      08-20-2003
"Vivek" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> To what level can we attain object oriententation with the C language?


Well, you can write a C++ compiler in C.

But seriously, like the old song said; "Anything C++ can do, C can do
better..."

.... You just have to do it the old fashioned way, by creating structures
with pointers to linked-lists of other structures, and stuff like that.
Kinda like the concept of an Interface in COM objects.

It's hard enough to do that they invented a new "generation" of languages to
handle it all, so why not use those? There's C++, Java, D, etc.

--
ArWeGod@sbc_global.net
Remove underscore to email.


 
Reply With Quote
 
 
 
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      08-20-2003
Vivek wrote:
> To what level can we attain object oriententation with the C language?
>


You may want to have a look on :
- the Gtk+ framework (http://www.gtk.org)
- Laurent Deniau's OOPC
(http://ldeniau.home.cern.ch/ldeniau/html/oopc/oopc.html)


The first one may not support all and every OO concept, but has proven
to be fairly usable - and used : Gnome is based on Gtk+.

The second is more complex, and seems to support more of the OO
concepts. I don't know how much it is used in production code, but if I
understand well, it has been developped by Laurent Deniau to use OO on
emmbedded platforms not supporting C++.

Google (+"C" + "object oriented" -Objective) also points to :
http://sunsite.nstu.nsk.su/sunworldo...ol-10-ooc.html
http://www.accu.org/acornsig/public/articles/oop_c.html (not really
interesting IMHO - mostly a confusion between ADT and OO).
http://www.ticalc.org/archives/files...251/25159.html
http://www.methodpark.com/produkte_oo2c_en_body.html
http://www.linux-mag.com/2000-10/compile_01.html
http://www.planetpdf.com/binthing~WebPageID,620.htm
etc...

Bruno

 
Reply With Quote
 
Malcolm
Guest
Posts: n/a
 
      08-20-2003

"Vivek" <(E-Mail Removed)> wrote in message
>
> To what level can we attain object oriententation with the C language?
>

Data encapsulation is easy and is done all the time.
All you do is define a structure, a function that creates it (the
constructor) and a function to destroy it (the destructor), and a few
functions that do interesting things.

What is very messy to do in C is inheritance and polymorphism. It is
possible, OO is a programming technique rather than a language, but if your
design calls for hierachies of objects then you are better off with a
higher-level language that supports these structures directly.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c is a low-level language or neither low level nor high level language pabbu C Programming 8 11-07-2005 03:05 PM
page-level vs control-level enableViewState =?Utf-8?B?Sm9l?= ASP .Net 3 10-26-2005 07:14 PM
Is Cisco PIX Application level firewall or Packet level firewall? Learning Cisco Cisco 3 10-15-2005 12:55 AM
Accessing higher security level from higher security level nderose@gmail.com Cisco 0 07-11-2005 10:20 PM
Page Level and Applicatoin Level Custom Errors rranveer@gmail.com ASP .Net 2 02-13-2005 02:03 AM



Advertisments