Live data from Hacker News

Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

hsutter.github.io

91–100 of 174 posts

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#91
post #56
post #35

Earlier quoted context omitted.

The roadmap for Carbon [0] mentions wanting to have basic, non-trivial programs written in Carbon by the end of 2024. They're aiming for a v0.1 release in 2025. If it gains traction, they're aiming for a v1.0 beyond 2027. I don't think anyone outside Google will seriously adopt this before it reaches v1.0. Even within Google, they may choose other options. [0] - https://github.com/carbon-language/carbon-lang/blob/tru…

Googles habit of dropping support for useful things make me not willing to trust them. I plan for my current code to be in use for at least 20 more years (i plan to retire before then), I don't want to explain to my boss either why we are maintaining a compiler or why we must rewrite working code.

I suspect you don't touch Go code.

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#92
post #50

Someone on reddit said that the cpp2 repo was a bit old, and that is true, although he may have started this as an experiment influenced by typescript and left it on the side at some times. Anyway I have no idea if cpp2 would get support from microsoft or other devs, but cpp2 seems like the most humble and "least risky" solution for the future of C++, and I really want it to be. What I remember the most that Herb Sut…

> Anyway I have no idea if cpp2 would get support from microsoft or other devs…

Doesn’t he work for Microsoft?

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#93
post #75

Earlier quoted context omitted.

An isomorphism is a structure preserving 1:1 map between two sets or some other pair of structures. While Java and Kotlin are interoperable (because they both target the JVM), they are not isomorphic for precisely the reasons you described. If it was, then you could do round trip machine translation on the syntax in either direction and have a result that's identical to the original. You can't do that because Kotlin…

> Cpp2 isn't trying to be a successor language to C++ Herb is trying to sell it as not a successor because for now that suits him better. Because C++ is a general purpose language Herb can deliver a "not a new feature" that is so elaborate in practice you would never write the equivalent C++ by hand, but Herb can insist that since technically it can still be transpiled to C++ it's not a different language... right up…

The linked article explicitly states

> What it isn't. Cpp2 is not a successor or alternate language [...]

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#94
It's a nice idea, but not clear that it can truly interoperate with vanilla C++ libs which I think is required. Seems to be waiting for modules to be finalized, but whether cpp2 can call cpp, and cpp can call cpp2 without implementing half of a C++ compiler isn't obvious. https://github.com/hsutter/cppfront/issues/594

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#96

Most of my personal issues aren't with C++ syntax as such (although it also has many problems). My main gripes are: 1. Very slow compilation. 2. Poor encapsulation, adding private functions requires recompiling all dependents, see (1). 3. Comically huge symbols make debugging much harder than it needs to be -- today gdb OOM'd my 16GB laptop when trying to form a backtrace of a typical QT application coredump. Unfortu…

Adding methods changes the vtable layout so there's no way to not recompile all the dependents. There's no solution to this unless private functions are guaranteed to not be virtual.

In typical c++ manner, we can’t have nice things because {obscure internal technicality that don’t impact the user in any way whatsoever}$. As a user I don’t care what a vtable is. Just make it work. Other languages don’t have this problem.

During release builds sure, optimize away with LTO and whatever is needed to make it vroom. During development, waiting several minutes for a minor private function update is just absurd.

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#98
post #50

Someone on reddit said that the cpp2 repo was a bit old, and that is true, although he may have started this as an experiment influenced by typescript and left it on the side at some times. Anyway I have no idea if cpp2 would get support from microsoft or other devs, but cpp2 seems like the most humble and "least risky" solution for the future of C++, and I really want it to be. What I remember the most that Herb Sut…

> Anyway I have no idea if cpp2 would get support from microsoft or other devs, but cpp2 seems like the most humble and "least risky" solution for the future of C++, and I really want it to be.

That ship has sailed. They already have C#.

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#99
post #98
post #50

Someone on reddit said that the cpp2 repo was a bit old, and that is true, although he may have started this as an experiment influenced by typescript and left it on the side at some times. Anyway I have no idea if cpp2 would get support from microsoft or other devs, but cpp2 seems like the most humble and "least risky" solution for the future of C++, and I really want it to be. What I remember the most that Herb Sut…

> Anyway I have no idea if cpp2 would get support from microsoft or other devs, but cpp2 seems like the most humble and "least risky" solution for the future of C++, and I really want it to be. That ship has sailed. They already have C#.

To be fair C# is vastly different in terms of semantics compared to C++. There's a lot of areas where it's not viable to use C#, and IMHO it also has its own share of legacy and bad decisions from its "Java clone" days that make it impossible to prefer it to C++ sometimes.

Btw Microsoft is definitely interested into adopting new languages, just look all the effort they've been pouring into Rust lately.

Re: Overview: What are Cpp2 and cppfront? How do I get and build cppfront?

#100
post #50

Someone on reddit said that the cpp2 repo was a bit old, and that is true, although he may have started this as an experiment influenced by typescript and left it on the side at some times. Anyway I have no idea if cpp2 would get support from microsoft or other devs, but cpp2 seems like the most humble and "least risky" solution for the future of C++, and I really want it to be. What I remember the most that Herb Sut…

How about Google's Carbon language?

https://github.com/carbon-language/carbon-lang

Post reply on HN