Live data from Hacker News

The first new build of Circle, a new C++20 compiler, since April 2022 is online

github.com

1–10 of 80 posts

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#3
Truly an amazing project. One person implementing the entire C++ standard, and then countless new, useful features on top of it. Circle did the interpreted, compile-time pass idea before any of the other new systems languages.

Carbon and C++Next both seem very directly "inspired" by Circle, but neither of those efforts seem to have actually produced anything yet.

Ideally, Circle it would be open source. But I understand wanting to hold out for some amount of corporate sponsorship first.

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#4
From all possible wannabe be replacements for C++ that poped up in 2022, Circle is definitely the one that has the most going for it.

Everything else requires rewriting everything, and they can only support a limited subset of C++ features, so if the goal is full compatibility with existing code they aren't going to achieve it anyway.

For full rewrites, we already have enough alternatives with more maturity years behind them.

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#5
post #4

From all possible wannabe be replacements for C++ that poped up in 2022, Circle is definitely the one that has the most going for it. Everything else requires rewriting everything, and they can only support a limited subset of C++ features, so if the goal is full compatibility with existing code they aren't going to achieve it anyway. For full rewrites, we already have enough alternatives with more maturity years beh…

This lays groundwork for opt-in safety per file, but safety should affect API design. Once you get done doing this to every file and refactoring every public API, have you really spent less effort than would have gone into a rewrite? If you only get halfway there, is the new version going to blow up any less often?

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#6
post #4

From all possible wannabe be replacements for C++ that poped up in 2022, Circle is definitely the one that has the most going for it. Everything else requires rewriting everything, and they can only support a limited subset of C++ features, so if the goal is full compatibility with existing code they aren't going to achieve it anyway. For full rewrites, we already have enough alternatives with more maturity years beh…

This lays groundwork for opt-in safety per file, but safety should affect API design. Once you get done doing this to every file and refactoring every public API, have you really spent less effort than would have gone into a rewrite? If you only get halfway there, is the new version going to blow up any less often?

Depends if the goal is to improve the safety of existing C++ code, or fully rewrite into something else.

Until the likes of LLVM, GCC, CUDA, V8 and co get rewritten into something else, improving existing C++ codebases is still an issue.

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#7

Truly an amazing project. One person implementing the entire C++ standard, and then countless new, useful features on top of it. Circle did the interpreted, compile-time pass idea before any of the other new systems languages. Carbon and C++Next both seem very directly "inspired" by Circle, but neither of those efforts seem to have actually produced anything yet. Ideally, Circle it would be open source. But I underst…

> Circle did the interpreted, compile-time pass idea before any of the other new systems languages.

constexpr is in C++11, Jai is from 2014, and Zig 0.1.1 is from 2017.

This project looks quite cool though.

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#8

Truly an amazing project. One person implementing the entire C++ standard, and then countless new, useful features on top of it. Circle did the interpreted, compile-time pass idea before any of the other new systems languages. Carbon and C++Next both seem very directly "inspired" by Circle, but neither of those efforts seem to have actually produced anything yet. Ideally, Circle it would be open source. But I underst…

> One person implementing the entire C++ standard, and then countless new, useful features on top of it.

Isn't it done on top of LLVM/Clang++?

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#9
post #8

Truly an amazing project. One person implementing the entire C++ standard, and then countless new, useful features on top of it. Circle did the interpreted, compile-time pass idea before any of the other new systems languages. Carbon and C++Next both seem very directly "inspired" by Circle, but neither of those efforts seem to have actually produced anything yet. Ideally, Circle it would be open source. But I underst…

> One person implementing the entire C++ standard, and then countless new, useful features on top of it. Isn't it done on top of LLVM/Clang++?

LLVM? Yes. Clang? No.

The front-end compiler and standard library are written from scratch, but it uses LLVM as the backend. The standard library is not yet complete, but it's amazing how it uses Circle's unique features to implement in a very elegant and efficient manner certain classes like variant and tuple which are absolute monstrosities of complexity in clang/g++/MSVC.

Re: The first new build of Circle, a new C++20 compiler, since April 2022 is online

#10
Yes yes yes. Everything about this document screams good sense and logic.

It's clear why Carbon looks the way it does - they want to do what Kotlin did for Java and using the same strategy. But, it won't work. They understood Kotlin's strategy as binary compatibility at the per source file level but that's only half the story. The quiet monster of Kotlin's success is j2k which is a source translation tool built into the IDE. It rewrites a Java file to Kotlin and then applies all the intelligence in the ide plug-in to clean up the results, meaning even idioms get translated properly.

Jetbrains could do that because they were developing the IDE plug-in alongside the compiler from day one, and because Java is quite easy to parse, and because Kotlin deliberately constrained itself to Java semantics even when sub optimal.

I had high hopes for Carbon when I first heard about it but that number of proposals without even having a compiler is crazy. How do you port existing code? You can only use it for newly added code, presumably, and only if your new code doesn't interact with any c++ using the bits the carbon team don't like? That's light years from the type of interop that made Kotlin a success.

Sounds like this guy actually understands the problem in depth. I hope he's able to attract customers, though it's a tough sell to make your company codebase depends on a language maintained by only one guy.

Post reply on HN