3 ms·
Circle is the "C++ Successor" language I am most excited about, after writing a fair amount of D, and trying the Carbon interpreter. The issue with D is that w
by gavinray 3y ago
Circle is the "C++ Successor" language I am most excited about, after writing a fair amount of D, and trying the Carbon interpreter.
The issue with D is that while it's a great language, and it has C++ interop, it doesn't have _direct_ C++ interop. As in, "just import an existing header and it works." You have to write or try to auto-generate "extern C++" definitions.
The issue with Carbon is that it is slowly-progressing vaporware at this point with as-yet-untested C++ interop.
Circle is real, has a "Carbon" mode that makes it syntactically identical, and yet has "just import it" interop. It's not open-source yet but hey, you can't have everything at once I guess.
---
(I want to add that I think D is a great language in it's own right, just not as "C++ successor")
- pjmlp 3y agoFor me, it is the only one that deserves "TypeScript for C++" nickname, given its evolution approach.
- geertj 3y agoI had the same vibes with Herb Sutter's cppfront. It offers full source compatibility by introducing a new syntax that can be mixed freely with the traditional syntax. Seems like it's actively being worked on here https://github.com/hsutter/cppfront https://github.com/hsutter/cppfront. I've not looked at Circle in depth. Do you or anyone else have a perspective on how they compare?
- mokash 3y agoi believe cppfront is more of a way to try out and demonstrate ideas in the hopes that they are adopted by the cpp standard
- geertj 3y agoNot really the way I understand cppfront. While Herb uses modest language when describing his project, my take is that's because it's a huge effort that might fail, but it does not indicate lack of ambition. If anything, I think this is hugely ambitious. The work in the standards committee provides the necessary infrastructure to make this feasible in the first place. On his Github he lists the changes that went into C++ over the last years that enable this prototype. It's pretty clever really, and dare I say, it seems feasible. This essentially creates syntax bubbles inside the language where there are different defaults, and then transpiles those bubbles to regular C++ while copying the rest verbatim. See this https://godbolt.org/z/nPPMYM3Yj https://godbolt.org/z/nPPMYM3Yj as an example how array accesses are transpiled to do bounds checking.
- deleted 3y ago[deleted]