"Small C++" Anyone?

J

JohnQ

(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post).

It would be more than a little bit nice if C++ was much "cleaner" (less
complex) so that it wasn't a major world wide untaking to create a toolchain
for it. Way back when, there used to be something called "Small C". I wonder
if the creator(s) of that would want to embark on creating a nice little
Small C++ compiler devoid of C++ language features that make toolchain
(including the compiler) a nightmare to implement (?). Yes, I realize that
would be a subset or a "dialect" of C++. Or not! They could call it
something else and avoid all the flak from the "use all of C++ all of the
time" proponents. I'd try and tackle that myself if I had another 100 years
to live. Alas, I don't so I have to stay focused on what I can produce at a
higher level of usage instead of diving into something new and so low level.

A "new" clean "little" language that is wholly a subset of C++ but is
tremendously easier to implement and to create a toolchain for. That's the
ticket! Could something like that "put C++ out of business"?

John
 
I

Ian Collins

JohnQ said:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post).

It would be more than a little bit nice if C++ was much "cleaner" (less
complex) so that it wasn't a major world wide untaking to create a toolchain
for it. Way back when, there used to be something called "Small C". I wonder
if the creator(s) of that would want to embark on creating a nice little
Small C++ compiler devoid of C++ language features that make toolchain
(including the compiler) a nightmare to implement (?). Yes, I realize that
would be a subset or a "dialect" of C++. Or not! They could call it
something else and avoid all the flak from the "use all of C++ all of the
time" proponents. I'd try and tackle that myself if I had another 100 years
to live. Alas, I don't so I have to stay focused on what I can produce at a
higher level of usage instead of diving into something new and so low level.

A "new" clean "little" language that is wholly a subset of C++ but is
tremendously easier to implement and to create a toolchain for. That's the
ticket! Could something like that "put C++ out of business"?
That sounds a bit like going back to one of the original cfront
compilers, or maybe EC++?
 
P

Piyo

JohnQ said:
A "new" clean "little" language that is wholly a subset of C++ but is
tremendously easier to implement and to create a toolchain for. That's the
ticket! Could something like that "put C++ out of business"?

John

Not a particularly new discussion. Here is an idea to "simplify" C++
called EC++:

http://en.wikipedia.org/wiki/Embedded_C++

I'd have to agree with Stroustrup here. Here are some other alternatives
I could suggest you look into:

a) Scala (if you are a Java man)
http://en.wikipedia.org/wiki/Scala_(programming_language)
b) D (if you like C++)
http://en.wikipedia.org/wiki/D_programming_language

BTW, Are you sure it is alright to post things like this on this
newsgroup?
 
D

Dennis \(Icarus\)

JohnQ said:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post).

It would be more than a little bit nice if C++ was much "cleaner" (less
complex) so that it wasn't a major world wide untaking to create a toolchain
for it. Way back when, there used to be something called "Small C". I wonder
if the creator(s) of that would want to embark on creating a nice little
Small C++ compiler devoid of C++ language features that make toolchain
(including the compiler) a nightmare to implement (?). Yes, I realize that
would be a subset or a "dialect" of C++. Or not! They could call it
something else and avoid all the flak from the "use all of C++ all of the
time" proponents. I'd try and tackle that myself if I had another 100 years
to live. Alas, I don't so I have to stay focused on what I can produce at a
higher level of usage instead of diving into something new and so low level.

A "new" clean "little" language that is wholly a subset of C++ but is
tremendously easier to implement and to create a toolchain for. That's the
ticket! Could something like that "put C++ out of business"?

I think the very things that make C++ hard to implement (e.g. templates,
namespaces) would wind up being requested or added to the "Small-C++" over
time.

Dennis
 
D

dave_mikesell

(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post).

It would be more than a little bit nice if C++ was much "cleaner" (less
complex) so that it wasn't a major world wide untaking to create a toolchain
for it.

We already have D, Java, etc. Just create coding standards for you
and your team to use. No need to dumb down the language. There's
something for everyone in C++.
 
K

kwikius

A "new" clean "little" language that is wholly a subset of C++ but is
tremendously easier to implement and to create a toolchain for. That's the
ticket! Could something like that "put C++ out of business"?

AFAICS there are 2 approaches to programming language design. Either
make it for the compiler writer, or make it for the user.

The end result of the first approach is functional laguages and in
fact these are generally reckoned to be good when you wish to automate
things ( e.g when writing a compiler). C++ is the end result of the
second approach. It is a wonderful language to write code in ( Once
you have learned the main features and acquired some mastery), but a
compiler writers nightmare).

I had a brief dip into D. This aims to do something like what you
want. However it seems that as users discuss their usage and make
feature requests, so D is starting to become more and more complicated
and quirky just like C++ :)


regards
Andy Little
 
T

throatslasher

Not a particularly new discussion. Here is an idea to "simplify" C++
called EC++:

http://en.wikipedia.org/wiki/Embedded_C++

I'd have to agree with Stroustrup here. Here are some other alternatives
I could suggest you look into:

a) Scala (if you are a Java man)http://en.wikipedia.org/wiki/Scala_(programming_language)
b) D (if you like C++)http://en.wikipedia.org/wiki/D_programming_language

BTW, Are you sure it is alright to post things like this on this
newsgroup?

It most certainly is not "alright" to post "things" like this on this
newsgroup. "These" kind of posts really ride my wig off, and I think
you know what I mean. Folks, it is truly a sad day.
 
J

JohnQ

Ian Collins said:
That sounds a bit like going back to one of the original cfront
compilers, or maybe EC++?

EC++ sounds like a good starting point, along with a compiler implementation
complexity analysis of each feature of C++. Surely cfront (but the cfront
implementations are all proprietary as far as I know) and "Inside the C++
Object Model" would be good references for the implementation. Now just to
get someone to actually produce the thing. An open source project? Perhaps
PJ Plauger's outfit has this already done? An open source may be desireable
(or at least available source for those who wanted to flesh out a toolchain
with analyzers and such).

John
 
J

JohnQ

Piyo said:
Not a particularly new discussion. Here is an idea to "simplify" C++
called EC++:

http://en.wikipedia.org/wiki/Embedded_C++

I'd have to agree with Stroustrup here. Here are some other alternatives
I could suggest you look into:

a) Scala (if you are a Java man)
http://en.wikipedia.org/wiki/Scala_(programming_language)

No proprietary environment languages please. I like C++. I don't really want
a different language, just an "improved" C++. (Of course, the standards
folks would say that if it's not in the spec, it's not C++. Call it
whatever, I don't want drastic departure from a subset of C++.)

I took a cursory look at D and find it a drastic departure from C++. I'm not
looking for a new language lock/stock/barrel, perhaps just a subset with
maybe just a few additions. "A better C++" if you will. But unlike "a better
C", less would be more.
BTW, Are you sure it is alright to post things like this on this
newsgroup?

Why not? Forward-thinking about the future of C++ is on topic. As is
analysis of the complexity of implementing C++ features.

John
 
I

Ian Collins

JohnQ said:
EC++ sounds like a good starting point, along with a compiler implementation
complexity analysis of each feature of C++.

EC++ is an abomination. If you want to use a small subset of C++, do
just that. The last thing the world wants is yet another bastardised
language.
Surely cfront (but the cfront
implementations are all proprietary as far as I know) and "Inside the C++
Object Model" would be good references for the implementation. Now just to
get someone to actually produce the thing.

cfront is an historical artefact, we have moved on.
 
J

JohnQ

throatslasher said:
It most certainly is not "alright" to post "things" like this on this
newsgroup.

Why do you think that? Are you one of those that are always typing "don't
reinvent the wheel... if it's not an _STL_ container, it's not C++... blah,
blah"?.
"These" kind of posts really ride my wig off, and I think you know what I
mean.
Why?

Folks, it is truly a sad day.

Sounds like you're over-reacting about something. What's your beef?

John
 
J

JohnQ

Dennis (Icarus) said:
I think the very things that make C++ hard to implement (e.g. templates,
namespaces) would wind up being requested or added to the "Small-C++" over
time.

No, of course they wouldn't. Otherwise there would be no sense in creating
"Small C++": you'd have Std C++! Perhaps fresh and new ideas would be added
though, where they cannot be in Std C++ because of the constraint of
backward compatibility and resistance to reconsider (or throw away) what has
already been implemented (read, C++ is stagnating as an evolving language in
the "taken as gospel" aspects (not AOP), but there are already known lessons
from the implementation that could be improved upon in a "new" language
unencumbered with the Std C++ entrenchment).

There, did I say that right? It's not meant to fluster any feathers.

John
 
J

JohnQ

We already have D, Java, etc. Just create coding standards for you
and your team to use. No need to dumb down the language. There's
something for everyone in C++.

Yes, one could just use the subset of C++ that one wants to. But that still
doesn't make the possibility of more entrants (as well as DIYers) into the
toolchain market. I think there is a lot of good possibilities out there but
the complexity of implementation keeps the number of participants lower than
desireable. It's hard to build better things when you are faced with so much
complexity of implementation at the onset. I'm not suggesting changing C++,
but rather deriving a new, VERY C++-like language. (Aside: "something for
everyone in C++" may be the problem).

Just a thought.

John
 
I

Ian Collins

JohnQ said:
Yes, one could just use the subset of C++ that one wants to. But that still
doesn't make the possibility of more entrants (as well as DIYers) into the
toolchain market.

gcc is available just about everywhere. C is a very simple language,
how many people bother to compete in the C toolchain market? Answer,
not many, it is too full. Just about every platform has a proprietary C
compiler as well as gcc. There isn't the demand for alternatives.
 
R

Ross A. Finlayson

Ian said:
gcc is available just about everywhere. C is a very simple language,
how many people bother to compete in the C toolchain market? Answer,
not many, it is too full. Just about every platform has a proprietary C
compiler as well as gcc. There isn't the demand for alternatives.

It seems like you want just another pass in the C compiler for the
code generation. Then templates etcetera can be implemented.
Templates can be implemented in C, they're much more concise in C++
with the mangling and etcetera.

Ross F.
 
J

JohnQ

kwikius said:
AFAICS there are 2 approaches to programming language design. Either
make it for the compiler writer, or make it for the user.

Beyond those "only 2" are good engineering that considers all the aspects
and creates something practical, elegantly simple. Your "there are only 2
approaches" is myopic or extremism: only seeing endpoints rather than a
range or continuum of possibility. I think maybe C++ suffers from "gold
plating" (the excess functionality of templates for example).
I had a brief dip into D. This aims to do something like what you
want.

Does it? How? I didn't get that impression from reading about it at the
website.
However it seems that as users discuss their usage and make
feature requests, so D is starting to become more and more complicated
and quirky just like C++ :)

See, so it's hardly what I hint at.

John
 
D

Dennis \(Icarus\)

JohnQ said:
No, of course they wouldn't. Otherwise there would be no sense in creating
"Small C++": you'd have Std C++! Perhaps fresh and new ideas would be added
though, where they cannot be in Std C++ because of the constraint of
backward compatibility and resistance to reconsider (or throw away) what has
already been implemented (read, C++ is stagnating as an evolving language
in

Templates (generics) solve a nice set of real-world problems.
I'd expect that, were this not a part of "small-c++" a tempalte/generic sort
of mechanism would be rather quickly requested.

Same with namespaces.
the "taken as gospel" aspects (not AOP), but there are already known lessons
from the implementation that could be improved upon in a "new" language
unencumbered with the Std C++ entrenchment).
Indeed.


There, did I say that right? It's not meant to fluster any feathers.

Dennis
 
J

JohnQ

Ian Collins said:
EC++ is an abomination.
Why?

If you want to use a small subset of C++, do
just that. The last thing the world wants is yet another bastardised
language.

Sounds like passion rather than objectivity.
cfront is an historical artefact, we have moved on.

Or "stagnated"? :p Dish it out and take it. LOL. To someone wishing to
create "a better C++" and not wanting to reinvent the wheel, cfront may save
some people some time.

John
 
J

JohnQ

Ian Collins said:
gcc is available just about everywhere.

But, I assume, pretty unapproachable at the source code level. You see, the
whole point is to not have to wade through the mud of complexity for
features that are undesireably in "Small C++".
C is a very simple language,
how many people bother to compete in the C toolchain market? Answer,
not many, it is too full. Just about every platform has a proprietary C
compiler as well as gcc. There isn't the demand for alternatives.

You won't really know that until you create "that other thing", now will
you.

John
 
J

JohnQ

Ross A. Finlayson said:
It seems like you want just another pass in the C compiler for the
code generation. Then templates etcetera can be implemented.
Templates can be implemented in C, they're much more concise in C++
with the mangling and etcetera.

To be honest, I don't know what "Small C++" would look like. I just know it
would start out as a subset of C++ with some substitutional features
probably. It would be a good exercise if nothing else.

John
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top