On Wednesday, April 10, 2013 6:57:55 PM UTC+1, Öö Tiib wrote:
> On Wednesday, 10 April 2013 13:36:24 UTC+3, James Kanze wrote:
> > On Tuesday, April 9, 2013 2:50:59 PM UTC+1, Öö Tiib wrote:
> > > On Tuesday, 9 April 2013 15:12:49 UTC+3, Nobody wrote:
> > > > On Tue, 09 Apr 2013 01:27:09 -0700, Öö Tiib wrote:
> > > > > If C++ wants to stay alive then it needs to have its own libraries
> > > > > and not to rely on libraries made for other languages.
> > > > This statement is nonsensical on its face. If it was even remotely
> > > > close to the truth, C and C++ would never have achieved their
> > > > dominant positions.
> > > Nonsense or not but those dominant positions feel right now about
> > > as dominant as those of Objective-C, Shell script and Perl.
> > With the major difference that there doesn't seem to be any new
> > competition. C++ seems to have beat out Ada-95, and in a more
> > distant past, Objective-C and Modula-3, but since then, there's
> > not really been any new language which realistically attempts to
> > replace it.
> With Objective-C the competition is still quite close. Some like
> one some other. What are your criteria for competitive?
Actual use. Maybe I'm not looking in the right places, but I
don't see any large scale applications being developed in
Objective-C. It's use seems to be limited to small "apps" for
one particular system.
The fields I know best are network management and investment
banking. In both cases, the engines which actually do the work
are written almost exclusively in C++. In the case of
investment banking, the absense of Objective-C is very
significant, because ten or fifteen years ago, there was a large
body of code in Smalltalk, and one would think that Objective-C
would be the natural evolution from there, much more so than
C++. And there was a significant body of code in Objective-C.
It turned out (at least in the one case where I know something
of the history) that as the individual programs became more and
more complex, Objective-C became less and less adapt.
Objective-C is (probably---I don't have any actual experience
with it) better than C++ for creating totally new, experimental
implementations of small, interactive software. C++ is superior
for large, stable applications which need to be maintained over
time.
> > If something new does come along, that is to C++ what Python is
> > to Perl, I'd jump on it, but I don't see it happening.
> That is too high requirement perhaps. If something is to C that
> Python is to Perl then that would be enough to win C++ (that is
> about equally popular with C).
I see very few significant *new* applications written in C.
About the only exception is the Linux kernel, which I'm not sure
I'd consider a good example. (The Python interpreter would
perhaps be better. It's 100% C, and it does prove that you can
write clean and maintainable code in C. But it's really pretty
small, compared to most applications I work on.)
> > In the case of C++, the total is simply too large:
> > in the time it would take to redesign a new language with all of
> > the expressivity of C++, but clean, simple and elegant, C++ will
> > have added new functionality that are missing in the new
> > language.
> I still hope that C++ could be simplified. For example introduce
> modules, deprecate '#include'. Deprecate 'inline' too ("exported"
> definitions are "inline"). Make it optionally possible to acquire
> equivalents of '__FILE__' , '__LINE__' and '__FUNCTION__' of
> caller (like class type return value currently already is such
> optional hidden parameter in most implementations). Deprecate
> #define. As result ... most sane usages for preprocessor and
> 'inline' removed.
Now that we have threading, modules and garbage collection are
the two things missing in the language itself. Which is
surprising if you realize that both were present and working in
Modula 3, 15 or more years ago. It's not as if the solutions
aren't known. (Although the way C++ uses pointers, inherited
from C, makes garbage collection more difficult than in other
langauges.)
--
James