News for hackers. Stuff that matters.
Re:Learning C3 by SuperV1234 on Thursday May 29, 2025 @05:28PM (#44130571)
C++ is not slow to compile. The Standard Library is.
Re:Learning C3 by lerno on Friday May 30, 2025 @09:31PM (#44141257)
C++ is just slow to compile. With the standard library it is much worse. The problem is that with C++ you're not getting as much encapsulation as you would in C unless you do extra work that also has a performance hit (pimpl). This means that C++ code often has to recompile a whole lot more than C code does when doing incremental compilation in my experience.
Re:Learning C3 by SuperV1234 on Tuesday June 03, 2025 @06:50AM (#44168524)
This is just not true. There's nothing that makes C++ inherently slow to compile.

PImpl doesn't need to have a performance hit as you can implement it with a local fixed-sized buffer that's not heap-allocated.

You can also design your C++ codebase exactly as you would in C, so there's literally no reason why you'll need to recompile more in one language compared to the other.

Re:Learning C3 by jokoon on Wednesday June 04, 2025 @04:46AM (#44178563)
C++ is not context free.

A quick google "c++ grammar" will give you clues that C++ is not you average language. Templates are also turing complete, and probably not trivial to parse.

Of course I am not talking about C++98, but C++14, 17, etc, which add significant stuff.