Hacker News new | ask | show | jobs
by felixguendling 2267 days ago
I think the concept would look more like Rust. It is still compiled to machine code, not VM opcode. You do not need a VM and do not require a garbage collector, JIT, etc. which makes it suitable for more use cases.

But: if it's a completely new language (no backward compatibility to C++) - why do we need this? Can't we just use one of those new languages that are already available (Rust, Zig, Odin, Nim, just to name a few).

6 comments

> But: if it's a completely new language (no backward compatibility to C++) - why do we need this?

Would backwards compatibility to "modern C++" make more sense than no backwards compatibility?

The rational argument for what is being proposed is that companies with (total) hundreds of millions of lines of C++ code can migrate it incrementally and (hopefully) mostly mechanically as the language evolves ... which should be much cheaper and less risky than porting code to a new language.

There are probably also strong non-rational components, e.g. C++ people would like to keep working on C++, leveraging their existing skills and status, rather than jump to another community.

Those languages are all pretty different from C++, right? I'm assuming the new C++ would be very similar to old C++ with a bunch of things "considered harmful" removed.
Well I’ve seen at least three recent CppCon talks where they say that ‘for’ loops are harmful and a template function should be used always, so I would hope there would not be a removal of these things, just a non-concern with requiring that changes don’t break the compilation of 10+ year old code.
people are so serious and literal nowadays! ;)

(btw., since debate initiated, C++ standard attempts on garbage collection too - as well as on many powerful concepts incorporated into C# from here and there - and IL is compiled into machine code before execution, naturally, also making C# really had an intention of making a better but similar C/C++ without its crippling compatibility barriers towards improvements. C++ is more universal still - but considerably less than C - and it is all right, each have advantage here and there. You usually do not work on all use cases anyway! ;) No need to abandon backward compatibility with C++, abandoning will become a new language, we have quite a few already, it is done already!)

C# compiles to native code via MSIL.

C++ compiles to native code via LLVM bitcode.

> Can't we just use one of those new languages that are already available

what if you actually do like templates and class-based OOP ?