

Multi-Device C++ is used everywhere on planet Earth and beyond - T-zex
http://blogs.embarcadero.com/davidi/2013/02/26/42586

======
eric_bullington
I think it's a bit disingenuous to write that Linux uses C++. Clearly, the
kernel is in C, and nothing else. There is no C++ runtime support in the
kernel.

I get that there are userland applications in C++, but coreutils and all the
GNU apps traditionally used in Linux distros are in C. And if you're counting
userland apps, then you might as well say that Python and even JavaScript are
the language of Linux, particularly since their use is growing more and more
in most distros. Clearly, no one would make such a claim, so why for C++.

~~~
thebear
_I think it's a bit disingenuous to write that Linux uses C++._

I like the civility in this sentence, yet I'm inclined to say that it's more
than just "a bit disingenuous." Is there anybody who has not read this post by
Linus Thorvalds on C++:

<http://harmful.cat-v.org/software/c++/linus>

------
tinco
I see this article as a battle plan. If we want to rid the world of C++ (and
we as the programmers community certainly should in my opinion) it has to be
done by building a language/platform that addresses the needs of the software
mentioned.

Looking at the graph it amazes me Microsoft has not tried to tackle this more
directly. C# and Haskell only attack the application level, why was there
never an effort from them to improve the system level?

~~~
skurmedel
Invent a good alternative then. There are reasons why you don't run Haskell in
a fighter jet.

And you can certainly write crappy Haskell too. It is hip to shit on C++, I
get it. But for some types of software there is not a good alternative.

~~~
tinco
I fully agree it is quite easy and maybe even too easy to write crappy Haskell
but that is completely beside the point. I don't shit on C++ because that is a
hip thing to do, whatever that means. C++ is still used in some fields, and
obviously C# and Haskell (and by extension all modern languages) suck for
those fields.

I think C++ was a bad idea from the start, because it attempts to be a strict
superset of C, which is like trying to win a race while being tied to the
current front runner. It might have allowed C++ to use the rope to get in
front, but now its in front it just drags the language down.

I am trying to invent a good alternative, but obviously that is easier said
than done. I like to talk about it openly and provocatively so others who are
more qualified to do it might jump in and try too.

~~~
skurmedel
It is by no means perfect. But I think some parts of C++ is quite clever too.
Templates might allow horrible code, but every time you write a container type
in C or Go, you wish you had them.

------
Scramblejams
It isn't just C++ that could do with replacing.

I want the speed of C.

I want the soft realtime characteristics, practical functional, highly
granular GC, lightweight message passing concurrency, hot code reloading and
easy parallelism traits of Erlang.

I want the fault tolerance and network distribution tools of OTP.

I want to have access to hard realtime performance with some additional work.

I want type inference, and a static type system which stays out of your way
but can approach the if-it-compiles-it's-probably-bugless ideal, yet without
weighing you down where you don't need it. (When it comes to dynamic vs static
typing, I'd like a slider that I can move at will.)

I want immutability to be the default.

I want pattern matching and code-is-data macros.

I want recognition that the best part of object orientation is interfaces
rather than inheritance, but with a way to provide default implementations.

I want a syntax that's very readable (with a gofmt-style standard) and easy to
refactor without resorting to a heavyweight IDE. Parenthetically, I am not
opposed to parentheses. Its LoC counts should compete with the most expressive
languages without sacrificing much readability -- if that means some
readability for newbies is sacrificed, so be it, but it should read easily
once you've progressed beyond the neophyte stage.

Whenever we get those promised 1000 cores on a single chip, I want this
language to scale beautifully onto that kind of CPU.

If I can't write a hard realtime aircraft flight control system, a competitive
3D graphics engine, a complex web app, a word processor, a highly parallel
distributed numeric solver, a fault tolerant telecom switch, a variety of
throwaway sysadmin and text processing scripts and a selection of games across
multiple platforms without feeling like this language was the most appropriate
choice for all of these tasks, then it doesn't do everything I want.

I haven't done much with Ada or Eiffel, or enough with Lisp or Haskell, so
this list is probably too short on that basis alone.

And once I have all of those things, I'll have another list.

~~~
tinco
That's a fine list, and when said like that it might even be fun to implement
and relatively easy to accomplish, but there's a bigger battle before you can
write any of the software systems you mention.

You need all those things _and_ interoperability with existing libraries that
are written in C and C++, preferably both ways. That is a lot less fun to
implement.

Another thing is that implicit in the 'realtime' part of your requirement is
that you don't want a runtime system, and that bugs a whole bunch of your
earlier wishes. It also makes the language less interesting as many of the
cool features of modern languages depend on runtimes (it's why we can't use
Rust or Go!)

Whoever designs the new language needs to have a lot of restraint, knowing all
the fancy things modern languages have, and picking only those that can be
implemented whilst satisfying the needs that those core applications have.

~~~
Scramblejams
Oh, I forgot interoperability! I've grown so accustomed to connecting my
Erlang programs to C++ libraries through the simplicity of ports that I erred.

Thanks for adding to my list -- the more the merrier. :-)

It would be interesting to make the runtime optional, to see how close
together the two runtimey and runtimeless subsets could get. Or, perhaps it
would be possible to mark a section of code as runtime-free. IIRC some work's
been done on that but I don't think it's ever been practical.

~~~
ihnorton
Does Erlang do something special to make C++ interfacing easy? Any info/links
would be appreciated - I have only found info about calling C-exported code
with ports.

~~~
Scramblejams
No, not particularly. I've just settled on writing some shim C/C++ and using
msgpack or protobuf over the port to do the interfacing. I prefer it because
it feels the simplest to me. Obviously it could get complicated with some
applications, though that would be the case with just about any other method
of interfacing.

Oh, and did I mention my dream language has a great REPL, compiles nearly
instantly and can run interpreted, too?

------
z3phyr
AAA high quality video game engines are always writern in C/C++

Video games are one of the domains where C++ will always tend to be THE
standard choice, indispensible when creating engines.

------
ditoa
This is just an advert for C++ Builder XE3. There is nothing in this article
that a C++ programmer does not already know.

~~~
malbs
Yeah amazing they finally managed to ship it. XE3 came out last September, and
had essentially nothing new over XE2. They had to pull C++ support because it
was so buggy. Anyone who has been a C++ Builder customer will no doubt be
excited, finally a 64 bit RAD Studio C++ compiler they can migrate to. Last
big update C++ Builder customers got was (woo) unicode support quite a few
years ago.

------
frozenport
" _YOU_ are full of bullshit." (quote from Linus)

I'm pretty sure the Linux kernel uses C.

[http://thread.gmane.org/gmane.comp.version-
control.git/57643...](http://thread.gmane.org/gmane.comp.version-
control.git/57643/focus=57918)

\--------

------
richo
Read this: [http://miek.nl/downloads/2010/c++-talk.pdf?we-require-
more-d...](http://miek.nl/downloads/2010/c++-talk.pdf?we-require-more-
discussions)

Then read the article again. C++ terrifies me.

