so here is my favourite

http://esolangs.org/wiki/Ook!
Moderator: Ras
And you haven't noticed SQRT???
According to this source, it was not a redesign, but just an effort to get it to compile with g++ (presumably to allow certain C++ features to be used):Sven Schüle wrote:I see two reasons why that "C++ rewrite" of the Linux kernel failed:mar wrote:Huh. C++ is a superset of C. So I really don't see why Torvalds wanted to rewrite the kernel in C++,
that's completely stupid as it would break existing C programs.
1) You cannot simply "rewrite" something as complex as an OS kernel in C++ unless you also redesign it. A procedural-style software of that magnitude will remain procedural even if you introduce some classes, inheritance, something here and something there. I don't say that Linus made no attempt of a redesign but at least "rewriting in C++" does not suggest to me he did so.
In the dark old days, in the time that most of you hadn't even heard of the word "Linux", the kernel was once modified to be compiled under g++. That lasted for a few revisions. People complained about the performance drop. It turned out that compiling a piece of C code with g++ would give you worse code. It shouldn't have made a difference, but it did. Been there, done that.
I don't see why a kernel written in C++ could not run existing C programs.mar wrote:Huh. C++ is a superset of C. So I really don't see why Torvalds wanted to rewrite the kernel in C++,
that's completely stupid as it would break existing C programs.
Name mangling being reason #1 (overloading). There's more, much moresyzygy wrote: I don't see why a kernel written in C++ could not run existing C programs.
Reminds me of brainfuck
Do you realise that Linux executables are not linked against kernel object code?mar wrote:Name mangling being reason #1 (overloading). There's more, much moresyzygy wrote:I don't see why a kernel written in C++ could not run existing C programs.
No I don'tsyzygy wrote: Do you realise that Linux executables are not linked against kernel object code?
Name mangling is not an issue here at all.
Huh? Do you know what the Linux kernel is? It is not the C library....mar wrote:No I don'tsyzygy wrote: Do you realise that Linux executables are not linked against kernel object code?
Name mangling is not an issue here at all.Against CRT then? So all you have to do is use extern "C"
Cool. Very C++ish
You tell me. You don't link against kernel directly. You don't link against CRT. That sounds like magicsyzygy wrote:Huh? Do you know what the Linux kernel is? It is not the C library....
No, the normal way is to link against glibc, which will then invoke the kernel using a system call. Making a system call can only be implemented in assembly and you will not notice any difference between C and C++ there.mar wrote:You tell me. You don't link against kernel directly. You don't link against CRT. That sounds like magicsyzygy wrote:Huh? Do you know what the Linux kernel is? It is not the C library....
EDIT: how do you open a file then? You leave an email to Linus?