by badsectoracula · 6y ago · 0 comments
Also:
> I think it also makes sense for C++ developers whose projects are relatively short-lived, e.g. some games.
There is a difference between games and engines - the games might be short lived, but most C++ engines are very long lived, going back decades (e.g. see how the recent Half-Life Alyx can trace its codebase back to Quake 1 or pretty much anything based on the Unreal Engine going back to the mid-90s - there are screenshots of UE1 running on what appears to be either Windows 3.1 or NT 3.51). Even when "engines" are being made "from scratch" this is often a marketing gimmick and the "from scratch" was just renaming the engine because it got a new rendering model and people can't tell the difference. EVEN when this isn't case, often new engines are based on existing code and/or libraries.
While true the engines are also staffed and can absolutely keep up with changes. They regularly are tasked with new toolchains, platforms, OSes, and APIs to leverage already. This would just be more of the same, and if you look at the goals of the paper: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p213...
That lines up pretty damn well to what game engines want as well.
> One of the main reasons to stick with C++ (and C) is that the investment you put in the code you're writing right now, no matter how fugly it is, will be there and keep working in the future.
I think you should read the actual paper instead. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p213...
The things they talk about actually abandoning are things like byte sizes other than 8-bits or source code in file systems that don’t support file extensions or nested directories.
Chances are any existing C++ codebase is already not compatible with such systems that they want to more formally deprecate/abandon in the first place.
> Our experience is that providing broad ABI-level stability for high-level constructs is a significant and permanent burden on their design. It becomes an impediment to evolution, which is one of our stated goals.
This does not name it, but doesn't this refers to all those discussions about changing internal representation of std::string, std::vector and so on?
This does sound pretty scary. Once you have separate classes for "C++23 std::string" and "older std::string", you can no longer link together files built with different versions.. and this means you lose a lot past compatibility.
True but this is already something that isn't really "supported" broadly. Some standard libraries work hard to keep that working, but others tend not to, and nobody knows if it's supposed to work reliably or not. And support for this binary compatibility also varies across platforms, like I don't think Microsoft bothers since you're supposed to always bundle a specific version of the runtime with your binary.
Single-version prebuilt libraries become more of a problem, but are those that widespread vs. source-based libraries?
But I think the broader point here that the paper is really pushing is for the committee to actually make a statement on things like this instead of their historically vague "it sort of works but we're not saying it will or indeed saying anything at all"
If the python 3 interpreter could still run python 2 code. If you could mix and match python 2 and 3 code on a per-module, per-file or even per file basis, then the transition could have been so much smoother.
- the languages were not that different, so no need to learn the new version
- python core devs gave 10 years to make the transition. Then extended it.
- it was possible to write code running on python 2 and 3
- python is very expressive, hence the code base have way less numbers of lines than in C++
- python cared only about one implementation, Cpython. The rest of the world needed to follow. Some didn't, like Jython and stackless, and the community didn't blink.
Despite all that, the transition was very painful.
It's just that aghast people are the most vocal. You don't hear the 90% of people that are happy. They don't take the time to speak up. But the unhappy complain all the time.
Utterly pointless and reputationally ruinous. I don't do serious work in Python any more
We are at Python 3.8.
Python 3 has been around for 13 years, during which Python 2.7 was still supported.
This doesn't match reality. In reality, many Python projects have way more lines of code than equivalent C++ projects. Probably because of the 'expressiveness' you cite; you can't really showcase your love of coding and job security though artificial complexity without 'expressive' bells and whistles. (This is the idea that lead to languages like Go, I'm pretty sure.)
That said, C++ is plenty 'expressive' itself.
That is mathematically impossible. Even if the syntaxes were exactly the same (which they are not, python syntax is on average shorter), the low level nature of C++ requires your code to do operations that Python does need to do, such as memory management.
It's like stating the sky is red.
The to abandon backwards compatibility in C++ is to make a mockery even of the name of the language (see the "C" in there). If they want to create a new language they should call it something different. Willfully abandoning backwards compatibility and keeping the name is an abuse of one of the great brands in software.
I consider this more a case of the ossification of search.
Neither search engines nor specific sites like Stack Overflow deal with the fact that information can switch from right to wrong with age.
Except slowly people will be writing parts of it in Rust, or they would be using libraries written in Rust (because availability), and then after a while people get annoyed of using more than one language and the whole project will be rewritten in Rust. Of course, at that point, a new language will be invented and Rust code will be looked at as rusty :)
And realistically I'm not entirely sure how you can add C++ interop to Rust without also ruining Rust. It's a hard problem to say the least.
Wishful thinking.
https://kennykerr.ca/2019/11/05/rust/
https://twitter.com/benwilliamson/status/1240113606374686721
Source?
John Carmack said in 2004 that "there are still bits of early Quake code in Half-Life 2" - https://github.com/ESWAT/john-carmack-plan-archive/blob/mast...
In all seriousness, Half-Life Alyx is based on Source 2 which itself is based on Source 1 which is based on GoldSrc which is based on Quake 1.