473,385 Members | 1,846 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,385 software developers and data experts.

Will C ever have OO (any) as part of the std?

Will C ever have OO (any) as part of the std?

Tony
Nov 4 '08 #1
15 1350
"Tony" <to**@my.netwrites:
Will C ever have OO (any) as part of the std?
Seems unlikely. C++, Objective C, Java, and C# exist already,
and they have the market covered pretty well.
--
"I hope, some day, to learn to read.
It seems to be even harder than writing."
--Richard Heathfield
Nov 4 '08 #2
On Mon, 03 Nov 2008 20:01:24 -0800, Ben Pfaff wrote:
"Tony" <to**@my.netwrites:
>Will C ever have OO (any) as part of the std?

Seems unlikely. C++, Objective C, Java, and C# exist already,
and they have the market covered pretty well.
OO would be an uglification for C. It has been for fortran.
--
George

America must not ignore the threat gathering against us. Facing clear
evidence of peril, we cannot wait for the final proof, the smoking gun that
could come in the form of a mushroom cloud.
George W. Bush

Picture of the Day http://apod.nasa.gov/apod/
Nov 4 '08 #3
On Nov 4, 10:57*am, "Tony" <t...@my.netwrote:
Will C ever have OO (any) as part of the std?
?!?!?!?! :-) :-) ... :-(

APL is a better language than Forth; why not make
Forth more APL-like? Oh, and please rewrite the
shell I use to employ a video game-like interface.

When a blind-tasting test found that 51% of
consumers preferred Pepsi, Coke took its product
off the shelves, replacing it with a Pepsi
taste-alike named "Coke"! (Admittedly this bizarre
ploy turned into a money-winner for Coke when
it reintroduced Classic Coke a little later!)

Call me an old fogey, but I found it simplest
to simply copy old 'nvi' and 'csh' binaries when
I bought a new computer recently. Sounds like
I'd better keep a Classic-C Compiler binary
around also. 1/2 :-)

James Dow Allen
Nov 4 '08 #4
James Dow Allen wrote:
When a blind-tasting test found that 51% of
consumers preferred Pepsi, Coke took its product
off the shelves, replacing it with a Pepsi
taste-alike named "Coke"! (Admittedly this bizarre
ploy turned into a money-winner for Coke when
it reintroduced Classic Coke a little later!)
Close, but no.

http://en.wikipedia.org/wiki/New_Coke

--
pete
Nov 4 '08 #5
Tony wrote:
Will C ever have OO (any) as part of the std?
Nothing prevents you to do OOP with C. OOP is not bound to
languages. For a excellent OOP library for C have a look at
GObject:

http://library.gnome.org/devel/gobject/stable/

Wolfgang Draxinger
--
E-Mail address works, Jabber: he******@jabber.org, ICQ: 134682867

Nov 4 '08 #6
Tony wrote:
Will C ever have OO (any) as part of the std?
You can already do OO in C; it's just that some other languages have
features that make OO easier than it is in C. If you want a C-like
language with features that support OO, there's several to choose from,
as you almost certainly are already aware of. If there's any point at
all in the continued existence of C after the creation of perl, C++, and
java, it must be to take advantage of the greater simplicity of a
language that does not support OO. That simplicity makes the language
easier to learn, easier to understand, and easier to implement.

OO has it's advantages, too. That's why there's more than one
programming language in the world - different languages are better for
different types of tasks, no one language is best for all tasks.
Nov 4 '08 #7

"Tony" <to**@my.netha scritto nel messaggio
news:7L*****************@nlpi064.nbdc.sbc.com...
Will C ever have OO (any) as part of the std?

Tony
No, because no C programmer agree on a "single" way to do it in C. For
example Gtk+ has an oop-like system with GObject, but somebody could not
like all that macros and casts under the hood and all the typedefs (example:
gchar for char). So what one do? You create your own sort of oop in C of
course, as a mixture of what you've got already or completely from scratch.
I prefer the second option but you cannot always do that...
Nov 4 '08 #8
Probably not. The primary mandate for WG-14 is to
document current practice. Most OO proposals would
shift the focus of the purpose of C. As other have said
there are many OO languages rooted in C.

w..

Tony wrote:
Will C ever have OO (any) as part of the std?

Tony
Nov 4 '08 #9
Tony wrote:
Will C ever have OO (any) as part of the std?
Will the Elgin Marbles ever return to Greece?

--
Er*********@sun.com
Nov 4 '08 #10
Ben Pfaff wrote:
"Tony" <to**@my.netwrites:
>Will C ever have OO (any) as part of the std?

Seems unlikely. C++, Objective C, Java, and C# exist already,
and they have the market covered pretty well.
Besides, it already exists. It just isn't as simple to use, and
requires (horrors) discipline. For example:

typedef struct thing {
readfn readop;
wrtfn writeop;
size_t gutsize;
char guts[MAXGUTS]
} thing, *thingp;

with readfn and wrtfn pointers to procedures, can be used to
implement many of the types of operations used in OO. Then
"thing.readop" might require coding:

if (err = *thingp.readop(*thing, stdin, 100))
handlerr(err, *thing);

and I don't use this, so ignore any silly errors above.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Nov 4 '08 #11
In article <7L*****************@nlpi064.nbdc.sbc.com>, "Tony" <to**@my.net>
wrote:
Will C ever have OO (any) as part of the std?

Tony
Yes. It's called Objective-C.

--
I'm not even supposed to be here today.

I ASSURE YOU WE'RE OPEN!
Nov 5 '08 #12
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

S M Ryan wrote:
Yes. It's called Objective-C.
Objective-C extensions are no covered by any C standard. It's just
another programming language that is based on C.

Pawel Dziepak
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkkRnA4ACgkQPFW+cUiIHNq4IgCfQs2e7gjdcV Qlg7gVNJVdEFtR
UpAAoJDhBDgbChAbpqwgvkx7DxKTwMZF
=45bY
-----END PGP SIGNATURE-----
Nov 5 '08 #13

"Pawel Dziepak" <pd******@quarnos.orgha scritto nel messaggio
news:ge**********@registered.motzarella.org...
>
Objective-C extensions are no covered by any C standard. It's just
another programming language that is based on C.
Yes and the syntax is quite different (and horrible in my view)...
Nov 5 '08 #14
Pawel Dziepak wrote:
>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
.... snip ...
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkkRnA4ACgkQPFW+cUiIHNq4IgCfQs2e7gjdcV Qlg7gVNJVdEFtR
UpAAoJDhBDgbChAbpqwgvkx7DxKTwMZF
=45bY
-----END PGP SIGNATURE-----
Please eliminate this useless gup.

I'll revise that - it has a purpose - to annoy.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
Nov 5 '08 #15
On 4 nov, 04:57, "Tony" <t...@my.netwrote:
Will C ever have OO (any) as part of the std?

Tony
You can download the "C Object System" from sourceforge which is a
pure C library. The current release is 0.7 but it's already pretty
stable for the CosBase module which is the required module to do OO in
C. It requires a C99 preprocessor but a C89 compiler once preprocessed
(obviously a C99 compiler is ok). The CosStd module is still under
development (unstable).

The features provided by COS go far beyond to other framework (e.g.
GObject) and some languages (e.g. Objective-C):

- uniform object model (class, metaclasses) better organized than in
Objective-C
- multimethods (methods member of more than one class) with a
dispatcher faster than Objective-C and as fast as virtual function of C
++ (for single dispatch).
- fast message forwarding (about 50-80 faster than Objective-C)
- exception and contract
- ownership and memory management
- introspection
- closure
- thread compliant (use TLS if available, pthread otherwise)

I can send you some transparencies on COS as a (very short) manual,
but still enough since COS is rather simple for C programmers with
minimum OO knowledge.

regards,

ld.



Nov 5 '08 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: greatbooksclassics | last post by:
Open Source DRM? What does everyone think about it? Will Open Source DRM ever catch up to MS DRM? Will DRM ever be integrated into common LAMP applications?...
11
by: Simon Shutter | last post by:
Forgive me if I am posting to wrong newsgroup and for a couple of loaded questions. First, from what I understand, one of the advantages of XHTML/CSS is the ability of screen readers/braille...
0
by: palomine1234 | last post by:
PAYPAL MAGIC!!! TURN $5 INTO $15,000 IN ONLY 30 DAYS...HERES HOW! This is a Money Scheme and Not, I repeat... This is Not a Scam!!!
33
by: llothar | last post by:
I'm afraid that the GIL is killing the usefullness of python for some types of applications now where 4,8 oder 64 threads on a chip are here or comming soon. What is the status about that for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.