Successor to C, not C++?

H

heepa9

Is anyone working on a successor to C that
will be object oriented but will not be C++?
I want to avoid the problems that come with
templates (which seem to tempt some people)
and which would be acceptable for use on
embedded platforms. Ideally, it would have
exception handling. I ask this because I think,
and almost everyone I speak with about it
agrees, that C++ has gone down the wrong
path in a number of ways. Notice, I'm not
crossposting this to the C++ NG, because
I really am seeking a thoughtful, knowledgeable
response and not a religious flamewar.

Thanks.
PS: Please don't say objective C.
 
P

P.J. Plauger

Is anyone working on a successor to C that
will be object oriented but will not be C++?
I want to avoid the problems that come with
templates (which seem to tempt some people)
and which would be acceptable for use on
embedded platforms.

Then you probably want EC++. It's already
widely available on embedded C/C++ compilers.
(Practically all of them use our library,
also available at our web site.)
Ideally, it would have
exception handling.

EC++ was speced without exception handling, but
you can turn it on in our library.
I ask this because I think,
and almost everyone I speak with about it
agrees, that C++ has gone down the wrong
path in a number of ways. Notice, I'm not
crossposting this to the C++ NG, because
I really am seeking a thoughtful, knowledgeable
response and not a religious flamewar.

That's kinda hard to avoid on this topic. FYI,
the C committee did consider such a creature
in the early 1990s. In the end, however, they
backed off from it, mostly due to a lack of
prior art (IMO).
Thanks.
PS: Please don't say objective C.

I won't if you won't.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
H

heepa9

It appears that the rationale with D is
"more is better". In the comparison given
between D and other languages, D always
has more features. I am not sure this is a
good idea, for one thing it can lead
to bloat certainly in the compiler but
possibly code too, but secondly it increases
the risk of bugs compiler and code,
especially if the number of people
writing the compiler is small.
 
M

Malcolm

Is anyone working on a successor to C that
will be object oriented but will not be C++?
I want to avoid the problems that come with
templates (which seem to tempt some people)
and which would be acceptable for use on
embedded platforms. Ideally, it would have
exception handling. I ask this because I think,
and almost everyone I speak with about it
agrees, that C++ has gone down the wrong
path in a number of ways. Notice, I'm not
crossposting this to the C++ NG, because
I really am seeking a thoughtful, knowledgeable
response and not a religious flamewar.
New languages are constantly being invented, and C is a popular base.

Java seems to have most of the characteristics that you are asking for - it
is basically an attempt to produce a cleaner C++. It also has the advantage
of having achieved wide acceptance.
 
R

Randy Howard

(e-mail address removed) wrote
(in article
Is anyone working on a successor to C that
will be object oriented but will not be C++?

There is also a "D" language, which has a set of newsgroups
hosted by Digital Mars, but probably not carried by your normal
news feed. I'm not too familiar with it, and don't know whether
or not it is really OOP or not. I spent about 30 minutes
looking at it once, so the newsgroups over there would be a
better place to find out.
PS: Please don't say objective C.

Oops. That's what I was thinking, although it is a far cry from
a perfect language, it has been used for a lot of GUI apps on
the Mac platform successfully.

How close to C do you want this language to be in syntax? Does
it even need to be close, or just have the features you want?
At any rate, since this isn't about C per se, but a hoped-for
alternative, comp.programming might be a better place.
 
K

Keith Thompson

Randy Howard said:
(e-mail address removed) wrote
(in article


There is also a "D" language, which has a set of newsgroups
hosted by Digital Mars, but probably not carried by your normal
news feed. I'm not too familiar with it, and don't know whether
or not it is really OOP or not. I spent about 30 minutes
looking at it once, so the newsgroups over there would be a
better place to find out.

There have been several languages called "D" (it's an obvious name for
something intended to be a successor to C, which is an obvious thing
to want to create). The one from Digital Mars is probably the best
known at this point.

[snip]
How close to C do you want this language to be in syntax? Does
it even need to be close, or just have the features you want?
At any rate, since this isn't about C per se, but a hoped-for
alternative, comp.programming might be a better place.

Or comp.lang.misc.
 
C

Chuck F.

Is anyone working on a successor to C that will be object
oriented but will not be C++? I want to avoid the problems that
come with templates (which seem to tempt some people) and which
would be acceptable for use on embedded platforms. Ideally, it
would have exception handling. I ask this because I think, and
almost everyone I speak with about it agrees, that C++ has gone
down the wrong path in a number of ways. Notice, I'm not
crossposting this to the C++ NG, because I really am seeking a
thoughtful, knowledgeable response and not a religious flamewar.

There are and have been several, including Modula and Ada. Ada is
probably the most successful.

--
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
<http://www.dinkumware.com/refxc.html> (C-library}
<http://gcc.gnu.org/onlinedocs/> (GNU docs)
 
R

Richard Bos

Chuck F. said:
There are and have been several, including Modula and Ada. Ada is
probably the most successful.

Those are successors to Pascal, not to C, though.

Richard
 
C

Chuck F.

Richard said:
Those are successors to Pascal, not to C, though.

They are all procedural languages, and actually bear a closer
resemblance to C than does C++, if you except the use of weird
syntax. Ada has managed to graft on object oriented extensions in
a clean manner.

--
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
<http://www.dinkumware.com/refxc.html> (C-library}
<http://gcc.gnu.org/onlinedocs/> (GNU docs)
 
L

Laurent Deniau

Is anyone working on a successor to C that
will be object oriented but will not be C++?
I want to avoid the problems that come with
templates (which seem to tempt some people)
and which would be acceptable for use on
embedded platforms. Ideally, it would have
exception handling. I ask this because I think,
and almost everyone I speak with about it
agrees, that C++ has gone down the wrong
path in a number of ways. Notice, I'm not
crossposting this to the C++ NG, because
I really am seeking a thoughtful, knowledgeable
response and not a religious flamewar.

Thanks.
PS: Please don't say objective C.

Over the past two year, I have been developping OOC which I plan to make
public at the beginning of 2006 (January or February). OOC is pure C89
code (C99 is a must) including some macros and lib and provides the
following features:

- Objects, Classes, Metaclasses and Protocols (everything is object)
- Inheritance and polymorphism (including covariant types)
- Strong code insulation (including ADT for class instances)
- Dynamic late-binding (methods, reassignable)
- Dynamic binding (protocols + methods)
- Type delegation (multiple inheritance, dynamic inheritance)
- Generic classes (genericity)
- Exceptions (non local errors)
- Simplified memory management (exception protection, efficiency)
- Closure and Composition (high order functions)
- Reflection (automatic metadata generation, requires ffi for non-obj)
- UnitTests (use reflection)
- Class dynamic loading (requires posix dynamic library)
- Threads (requires posix thread)

This is not a "new langage", neither another preprocessor. It is just
some C tricks that make possible to do OOP nearly as in Java.

a+, ld.
 
M

mateus.justino

I whole heartedly agree. I had a co-worker who was interested in D
because he saw that chart showing the features that D has in comparison
to C++. It looks really silly, that chart, like little more than a
marketing gimmick. Some of the things that they listed as C++ not
having is clever lying. C++ does have some of those things, they are
just available through the standard libraries instead of native
features which really makes you stop to wonder how bogged down D must
be with features that you'll probably not need for any given
application. Sure would be nice if they included that little tidbit,
or maybe just a row for speed as well where they explain how much
slower D is than C++.
 
A

August Karlstrom

Laurent said:
Over the past two year, I have been developping OOC which I plan to make
public at the beginning of 2006 (January or February). OOC is pure C89
code (C99 is a must) including some macros and lib and provides the
following features:

- Objects, Classes, Metaclasses and Protocols (everything is object)
- Inheritance and polymorphism (including covariant types)
- Strong code insulation (including ADT for class instances)
- Dynamic late-binding (methods, reassignable)
- Dynamic binding (protocols + methods)
- Type delegation (multiple inheritance, dynamic inheritance)
- Generic classes (genericity)
- Exceptions (non local errors)
- Simplified memory management (exception protection, efficiency)
- Closure and Composition (high order functions)
- Reflection (automatic metadata generation, requires ffi for non-obj)
- UnitTests (use reflection)
- Class dynamic loading (requires posix dynamic library)
- Threads (requires posix thread)

This is not a "new langage", neither another preprocessor. It is just
some C tricks that make possible to do OOP nearly as in Java.

You might want to know that OOC is also the name of an Oberon-2 compiler
(http://sourceforge.net/projects/ooc). By the way, Oberon-2 is a
language that supports object oriented programming and it resembles C in
terms of size (smaller than C) and efficiency.


August
 
C

Chuck F.

Please share the slides when they are available. It sounds very
interesting.

What slides? What is interesting? Without context your message is
completely meaningless. See below.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
 
M

Marco

"This is not a "new langage", neither another preprocessor. It is just
some C tricks that make possible to do OOP nearly as in Java."

There have been quite a few "OOC" implementations using macros over
the years. I hope you spent some time looking at those.
If you need some references let me know.

Keep us posted.
 
L

Laurent Deniau

Marco said:
"This is not a "new langage", neither another preprocessor. It is just
some C tricks that make possible to do OOP nearly as in Java."

There have been quite a few "OOC" implementations using macros over
the years. I hope you spent some time looking at those.

Yes, I have read about 20 papers and 2 books on this topic from the 90's
to now. The only serious proposals were the other OOC:

http://www.planetpdf.com/codecuts/pdfs/ooc.pdf

and my early not complete and too heavy approach (where you will find
some of the references):

http://www.cern.ch/ldeniau/html/oopc/oopc.html

The others publications were more oriented to syntactic OO features than
OO concepts.
If you need some references let me know.

If you can send me your list of reference, I will check if I did not
miss one ;-)

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,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top