Has thought been given given to a cleaned up C? Possibly called C+.

  • Thread starter Casey Hawthorne
  • Start date
T

Tim Rentsch

Ben Pfaff said:
But it also preserved backward compatibility, since pre-C89
versions of C assumed an "int" return type if none was
specified.

Yes, and I'd forgotten that. But I think it's incidental
to my point, or maybe even strengthens it a bit, since
implicit-int functions sometimes returned an int value.
Better to have the result type always be explicit, that
way there is never any confusion about which "default"
behavior is intended.
 
T

Tim Rentsch

If we're going to enhance the syntax of goto, I think it would make more
sense to use ``goto case 0x30'' rather than a bare integer constant
expression.

That might make more sense from a language viewpoint. I
deliberately left it out hoping people would realize my
suggestion wasn't serious. Curses, foiled again!
 
D

David Thompson

On 3/16/2010 1:23 PM, Andrew Poelstra wrote:
Can you compile java files separately and then distribute the
object files, linking them together all willy-nilly?

Answering what you probably meant: Yes.

Answering what you actually asked: No, because there's no
"linking" step in Java. You go straight from lumps of compiled
byte code (each lump representing a class or interface) to
classes (interfaces) loaded into the [JVM on-demand....]

And in particular, the preferred and most convenient technique is
either to compile (all) units that reference each other together, or
to first compile 'lower' unit(s) e.g. Z -- or get them precompiled, as
with the standard libs and many others -- and then compile the 'upper'
unit(s) e.g. A with Z(s) available in the/a classpath.

But it is possible to write stubs for B which only define the (public)
interface and compile them and compile A against them, and similarly
compile stubs for A and use them to compile B, and scale up similarly
to more complex cases. And there is enough type info in the .class
files that if you make a mistake doing this -- which you probably will
-- it gets caught at runtime (if not earlier) rather than executing
unpredictable and even dangerous wildness as is typical in C.
(Although a C implementation is *permitted* to DTRT.)
 
N

ng2010

jacob said:
C is still being used, and many important projects are based on it. My
thesis is that a simple language is necessary and useful. Adding
a general and extensible container interface for C doesn't change at
all the language but gives C programmer the advantages of not having
to program the same data structures over and over.

I would appear that you have not researched the market for your proposed
wares or you're trying to sell it in the wrong place (?). How many users
of lcc-win are there? Maybe a subset of that is the entire potential for
your wares: a niche of a niche. Do you even know the rate at which C
users are increasing or decreasing and what the trend over time has been?
Why not just produce your swiss-army container library and put it out
there and see how much usage it gets and if it affects the C usage
trends.

It also appears that you are trying to recruit others to develop the
product with you as it is in R&D stage or even concept stage, rather than
having a product to offer to whomever. Who is your target market? Joe C
coder? lcc-win user? The ISO C committee? It appears that the ISO C
committee is not a good alliance for your project/product. What is your
proposed product? Getting the committee to change the standard, or
offering a "fork" away from the standard? Both? If both, good luck
finding anyone to hop on that train.

Have you a written business plan (or project plan)? Without a detailed
plan, I think success is a pipe dream. Of course, there is no need for a
plan if your proposal is not seen by others as feasible. What did the
feasibility study show?

There are many things that have to be done before a project starts. If
you're one guy in a garage building something, maybe even have been doing
it for a long time, seeking resources/others to join you is a starting
point and you'll have to accept that and regroup and rethink things from
the other peoples' perspective. You seem to want to ignore all the
required precursors and few are going to "just believe you". Perhaps
start with a few like-minded people and see what comes of that. Going
from nothing to massive scale is highly unlikely, but you seem to be
thinking like that from what I can see having read a number of your
posts.

Finally, if you want a good promotion for your "product", see if you can
get some grant money or even venture capital if your sector is
commercial. It would only be a "promotion" if you could land some, of
course. A kind of "litmus test". If you can, chances are that other
people will be more willing to believe in what you are doing and be more
willing (less weary) to join you.

OK, one more "finally": It would be good if a group like the members of
this ng would rally around your product/project. If not, one has to ask
why not. I think you have some major chasms to cross, not the least of
which, and maybe the most important of which, is defining your
product/product and showing focus on that product/project and that you
know what the landscape and reality really is and how your
project/product fits in to all of that.
The proliferation of libraries that do the same thing WITHOUT a
standard in C means that each big project in C has several versions
of the same data structure because library XYZ uses lists with the
"Next" field in the fiorst position and library"XXX" uses a list with
Next in the
second position. Besides all APIs are different, etc.

Things like the above may make a case for a feasibility
study/proof-of-concept project.
This is SO OBVIOUS that doesn't even need to be discussed.

That last statement really hurts your "proposal". People will be weary
that you are in love with your own idea so much that you are wishfully
thinking and blinded to reality. A sort of "misery wants company" kind of
thing.
But C
should be kept in its present state so taht the only alternative is
to swallow C++

Well, you confirm everything that I said.

Your feasibility study should have detailed competitor analyses. Of the
cuff/ad hoc is probably not going to cut it for such a risky endeavor.
Not risky? Show "me"!
 
N

ng2010

Ian said:
One interesting question is why, after over 30 years of use, there
hasn't appeared a widely accepted a general and extensible container
interface for C?

Surely there would have been if C++ hadn't been created. Given that C++
has the underlying mechanisms to support such a thing much better than
anything that could be built with the current C underpinnings and that no
one (OK, maybe ONE) is in a hurry to change those fragile key stones that
so much software relies on, today that possibility looks about nil as
compared to before C++ was just a fluke neuron firing in Bjarne's mind.
Not to mention that those who own the software written in legacy C would
start to feel abandoned and start doing more rewriting in C++ perhaps
than waiting for C have a second childhood.
The C++ STL appeared fairly early on in that language's evolution and
was rapidly and widely accepted by C++ developers. The widespread use
resulted in it being incorporated into the standard library in first
language standard.

Why hasn't the same thing happened with C?

C++ curbed that. There was little reason to not just jump to C++ rather
than await something similar in C. C++ is now "C++ with C baggage" and no
one wants "NEW! IMPROVED! C with C baggage".

..03
 
N

ng2010

jacob said:
I have written most of the STL clone (AVL trees, RB trees, bitstrings,
flexible arrays, lists (double/single linked) and the whole library
is extremely fast and compact. It is just less than 100K when you use
all of it. If you use just the lists module it is less than 5K.

That's great! Now we just need to sit back and wait to see how many "buy"
it now that you have built it. ("Build it, and they will come!
Riiiiigggght?).
But apparently all this work is a waste of time. The committee decided
a feature freeze already, and I will not be ready to present this to
the next meeting in April.

Do you want committee endorsement for this so that you can be the first
one on the block with a product offering? See, now you'll have to
disclose and discuss in your proposals/feasibility studies etc, you and
your motivations. You will need independent party study of your
enterprise and of the ISO committee. It's fine to have the goal to make
lot's of money. But it would be bad to try and fool people into believing
that that isn't a motivation, primary or not, if it was one (and I'm not
suggesting at all what your motivations are, btw). It looks like you are
in-between a rock and a hard place: you don't own the primary product
(the ISO C standard) and want it to change so that your ancillary
product(s), grafted easily from C++-isms, can have a hey day. (Or
one/many could easily be so skeptical/untrusting/unbelieving). Your
pursuit may be even holding back any such effort in the ISO std rather
than helping it along.

Time will tell. You need to decide how long it will be before you move on
with your life and pursue other ventures if no one is warming up to this
one. Don't waste too much time, you only have one life.
 

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,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top