J
jacob navia
Richard Heathfield a écrit :
You have the situation now:
All programs of a minimum complexity need to use lists, hash tables,
and other containers. Since there is no standard all those programs
have a "utilities.c" module where they have ad hoc container libraries.
When you merge the code bases you see that the list package A is not
compatible with list package B. Complexity of porting increases.
When you see
c = Get_nth(a,b);
You do not know immedately what it does. The language is more complex
because a common vocabulary is missing and you need to figure out
what "Get_nth" does.
The language is simpler if we use a common vocabulary for common tasks like
lists.
Sure. But much more will say:
AT LAST!
I do NOT need to rewrite a list package AGAIN!
C has been always like that, and if you do not include stdio.h
you can roll your own I/O system. ANd there will be always people
that like to roll their own. They will be able to do that in the future.
The container library is for people that want to write THEIR software
and not rewrite a list package AGAIN!
So, you would say that strtok should be banned?
Besides the problems of multithreading with strtok are known. Maybe
you should consider that that could be a reason isn't it?
The library is written in standard C. I do not see where I am
doing C++. Obviously if you think that an abstraction like
containers is too much for C then please say it so.
Sure. Because it is completely dead. Or you are going to argue that
the spanner is alive?
Languages are used by living PEOPLE and that's why they evolve
with time, because the PEOPLE that use them evolve, as people always do.
Of course not. "C" is not alive. The PEOPLE that use "C" are alive, and
that is why C evolves!
I think that fgormal logic theory will evolve enough so that end of this
next decade they will be able to formalize C 100%. Until then, C is just
a convention used for communicating with a machine.
See above.
Well it is strange that the person that says this has written a
thick book about lists, and all kinds of containers.
True, that book stays always at a simplistic model, without ever
delving deeper into the problems of organizing data structures.
For instance the lists malloc for each element, etc. No performance
considerations, no generalization, etc.
I can't explain this to you. If you consider the situation now as
excellent, you are beyond help.
I am prepared to hear people like you:
"It will not work"
"We do not need it"
"Roll your own list package each time you start a project"
"Standards are just cumbersome"
"C is like that"
"The spirit of C is against that"
Who cares?
What is important in life is to try to better the environment
where you live, to improve things, to BUILD.
The passive people that are always saying that the best thing is to do
nothing are best ignored. It is a pity that instead of collaborating
in this project you just choose to fight it.
That's an interesting belief, but not one that is universally held.
That depends on whether you consider the library to be a part of the
language. Some do, others don't.
You have the situation now:
All programs of a minimum complexity need to use lists, hash tables,
and other containers. Since there is no standard all those programs
have a "utilities.c" module where they have ad hoc container libraries.
When you merge the code bases you see that the list package A is not
compatible with list package B. Complexity of porting increases.
When you see
c = Get_nth(a,b);
You do not know immedately what it does. The language is more complex
because a common vocabulary is missing and you need to figure out
what "Get_nth" does.
The language is simpler if we use a common vocabulary for common tasks like
lists.
Except that many programmers will look at any such standard and find
it wanting in some respect or other - e.g. it's too complex, or too
slow, or whatever.
Sure. But much more will say:
AT LAST!
I do NOT need to rewrite a list package AGAIN!
And so they'll go roll their own anyway.
C has been always like that, and if you do not include stdio.h
you can roll your own I/O system. ANd there will be always people
that like to roll their own. They will be able to do that in the future.
The container library is for people that want to write THEIR software
and not rewrite a list package AGAIN!
This
already happens, by the way - for example, people write their own
little parsing libraries rather than use strtok.
So, you would say that strtok should be banned?
Besides the problems of multithreading with strtok are known. Maybe
you should consider that that could be a reason isn't it?
That's what your container library is pointing towards.
The library is written in standard C. I do not see where I am
doing C++. Obviously if you think that an abstraction like
containers is too much for C then please say it so.
Here I have to disagree. Just because something no longer changes,
that doesn't mean it's of no use. I have a five-eighths spanner which
I've owned for over twenty years. It hasn't changed at all over those
twenty years, but it still does its job perfectly well.
Sure. Because it is completely dead. Or you are going to argue that
the spanner is alive?
Languages are used by living PEOPLE and that's why they evolve
with time, because the PEOPLE that use them evolve, as people always do.
The "life" analogy is interesting, but you have not yet convinced me
that it is appropriate. C isn't a living creature.
Of course not. "C" is not alive. The PEOPLE that use "C" are alive, and
that is why C evolves!
It's a formal
system (or at least it's reasonably close to being a formal system).
I think that fgormal logic theory will evolve enough so that end of this
next decade they will be able to formalize C 100%. Until then, C is just
a convention used for communicating with a machine.
It can't die because it isn't alive. We can choose to stop using it
if we like, but that won't kill it because it isn't alive.
See above.
It is certainly a good all purpose programming language. You don't
need to add a standardised container library to make it so.
Well it is strange that the person that says this has written a
thick book about lists, and all kinds of containers.
True, that book stays always at a simplistic model, without ever
delving deeper into the problems of organizing data structures.
For instance the lists malloc for each element, etc. No performance
considerations, no generalization, etc.
Why?
I can't explain this to you. If you consider the situation now as
excellent, you are beyond help.
It is missing because any interface proposal is bound to have more
opponents than supporters.
<snip>
I am prepared to hear people like you:
"It will not work"
"We do not need it"
"Roll your own list package each time you start a project"
"Standards are just cumbersome"
"C is like that"
"The spirit of C is against that"
Who cares?
What is important in life is to try to better the environment
where you live, to improve things, to BUILD.
The passive people that are always saying that the best thing is to do
nothing are best ignored. It is a pity that instead of collaborating
in this project you just choose to fight it.