r/cpp • • Apr 24 '20

C++ Fork?

Let me start by simply saying that I am fairly new to C++ and this is the first time I am posting to this sub-Reddit. I hope I am not breaking any rules here.

I have a question:

Would it be possible for C++ to be forked into a newer more modern version like the way Python went from version 2.x to 3.x? Maybe clean-up the language a bit, remove some redundant features etc.

0 Upvotes

51 comments sorted by

View all comments

24

u/BrainIgnition Apr 24 '20

Oh, we discussed that numerous times. And the gist of those discussions is that there are quite a lot of people who require backward compatibility. Things preventing C++98 code to be used by C++next are very unlikely to get approved by the commitee, because adapting existing codebases to major language changes is simply infeasible.

The python (r)evolution has been sort of a disaster -- there are major projects like gyp where it took a decade until people even started porting. Such a split is absolutely harmful to the ecosystem.

However, one should mention the Epoch proposal which tried to provide a mechanism for language changes while maintaining a "sufficient" degree of compatibility with existing code. It currently seems to be the most feasible approach, but it is uncertain whether its issues (with e.g. concepts) can be resolved.

I recommend taking a look at D or Rust which could be remotely considered as "newer more modern" versions which may or may not fit your bill.

8

u/jube_dev Apr 24 '20

The python (r)evolution has been sort of a disaster -- there are major projects like gyp where it took a decade until people even started porting. Such a split is absolutely harmful to the ecosystem.

What disaster? Python has never been so popular nowadays! Some libraries are resisting, that's not a disaster. And nobody ever said that such a transition would be instantaneous. 10 years is not so bad.

8

u/TheFlamefire Apr 24 '20

It's falling apart now. There are libraries out there which don't get updated to Python 3 while others only support Python 3 so if you need both you need to carefully check versions or drop one of them

Heavy amounts of work have been done to support Python 2 & 3 in one code base which is expensive. And some libraries didn't bother leading to more issues.

To get another picture how hard it was: The end of Python 2 was announced early, then shortly extended by 5 years, and almost 5 months after the official end the "last" Python 2 version was released...