7 ms·
Has anyone else looked at Herb Sutter's cpp2? For those that don't use C++, Herb is chair of the ISO C++ standards committee, and holds the position of "native
by taraharris 4y ago
Has anyone else looked at Herb Sutter's cpp2?
For those that don't use C++, Herb is chair of the ISO C++ standards committee, and holds the position of "native languages architect" at Microsoft.
https://twitter.com/herbsutter/status/1609307537261617154 https://twitter.com/herbsutter/status/1609307537261617154
This is a good introductory talk on cpp2 by Sutter at CppCon three months ago, where he demonstrates cppfront, the cpp2 -> C++ transpiler. One of the things I like about it is that the code it generates is human-readable and fully backwards-compatible with C++. If you use cpp2 in your project and end up not liking it, you still have the same (very reasonable) C++ code that you'd write by hand today if you followed the guidelines you're supposed to already.
https://www.youtube.com/watch?v=ELeZAKCN4tY https://www.youtube.com/watch?v=ELeZAKCN4tY
I think this is very promising, and I'm interested in using it my next project. We don't need a total replacement for C++, we just need to let out the awesome language that's always been hiding inside it.
- lanza 4y agoHe didn't staff a team of compiler engineers to do it. Doesn't matter how good it is when mature languages that reach the mainstream all have compilers funded by 10 people at a tech giant and cppfront is just Sutter screwing around in his free time. Google threw the weight of their top C++ engineers behind Carbon. It's happening. That's really what matters in the world of programming languages. Not how good it is.
- taraharris 4y agoJust watch what happens to Google and their ad revenues in this downturn, by the way. I knew people that were hyping Fuschia, and then Google cut deepest from that on their first round of layoffs. It wouldn't be a shock to me if they yank out the carpet from this Carbon thing one day, or have it limp along like Dart. In summary, Google can do what it wants, but I'll just keep using C++ no matter what it does. I spend all my time in and on HaikuOS now, so for me C++ here here to stay :)
- pjmlp 4y agoFuschia is shipping on Nest devices though.
- pornel 4y agoIt's on a device that is unimportant to Google, and it's just an implementation detail. Fuschia could disappear entirely in one software update, or with cancellation of the Nest product line. I like the ideas Fuschia is trying to implement, but unfortunately it still looks like a small experiment with an uncertain future.
- pjmlp 4y agoEven if it dies tomorrow, it already achieved more than many wannabe OS out there, so there is that. And who knows, just like it happened with Singularity and Midori having an impact on .NET design since WinRT, some Fuchsia ideas can be brought into Android in that case.
- smallstepforman 4y agoIt's good to see that you're having fun with Haiku. I actually enjoyed programming for Haiku a couple of years back on my Haiku only project (Medo), these days I'm 100% exhausted with my day job (and my previous company went into liquidation and I changed jobs / continents), and it's hard to make the time for passion projects. Best of luck with your project, I look forward to seeing it released one day.
- taraharris 4y agoWhoa cool! Medo is awesome! Thanks! I'm working on a port of Solvespace to Haiku. My goal is ultimately to give it a native UI and some new features, but I'm still early in the process. The latest thing I got working was some pixels in the screen from a replacement 2D renderer that uses AGG instead of Cairo. I post screenshots to Twitter as I go (@realtaraharris).
- warkdarrior 4y ago
- deleted 4y ago[deleted]
- UncleOxidant 4y ago> Google threw the weight of their top C++ engineers behind Carbon. It's happening. Google has a notoriously short attention span.
- Shish2k 4y ago> Google threw the weight of their top C++ engineers behind Carbon. It's happening. Google throws their weight behind a lot of projects. You can find a list of 282 of those projects here: https://killedbygoogle.com/ https://killedbygoogle.com/
- laurentlb 4y agoCarbon is explicitly marked as experimental and is not used yet at Google. The contributions from Google can be stopped at any time. So it's too early to say that "it's happening". Right now, it's just an experiment.
- tsoj 4y agoThe thing is, Sutter's approach is much more sensible when looking at real world adaptation. You can start using the cppfront transpiler, and importantly, if it doesn't work out, you can just use the C++ code generated by cppfront (which Herb Sutter said is meant to be idiomatic and human-readable). From a risk perspective, a developer will have a much easier time convincing a manager to try using cppfront instead of Carbon. Maybe once Carbon reaches a stable 1.0 release and has seen some success in production (~2026 maybe?), that point won't be as important, but especially in the beginning it seems to me a deciding factor.
- pjmlp 4y agoYeah, he tries to sell cpp2 as being different to the other alternatives, due to his position at ISO, however it is just the same thing being an alternative language, compiling via C++ translation doesn't change that.
- taraharris 4y agoThe thing I like about it is that it is the easiest thing to switch to. It provides the path of least resistance for my existing workflows, and that alone is reason enough for cpp2 to win.
- pjmlp 4y agoThat would be Circle, not a language with another syntax.
- humanrebar 4y agoCircle is nice, but it's not integrated with anything but compiler explorer. Cpp2 has a preliminary CMake integration PoC as of a week after Sutter's talk.
- pjmlp 4y agoCMake isn't the only build tool in town, I hardly use it for example.
- humanrebar 4y agoMy point was that whatever build system you are using doesn't support circle. The CMake thing was an example to illustrate and contrast.
- Animats 4y agoThat's the wrong direction. What's needed are intelligent converters which convert less-strict languages to more-strict ones. Non-intelligent converters just make a mess. Here's c2rust.[1] Classic C++ to modern C++, plus a compiler flag to lock out all the old unsafe stuff, would be an achievement. [1] https://c2rust.com/ https://c2rust.com/
- taraharris 4y agoHave you actually watched the talk, or are you just giving us yet another ad for Rust? cfront helps C++ developers switch from less-strict C++ to a much safer, much improved syntax known as cpp2, which may in the future become part of the C++ standard. I like Rust well enough, but I'm simply not interested in abandoning C++ and all of the incredible stuff written in it just for the sake of theoretical purity and safety.