logoalt Hacker News

Panzerschrektoday at 5:42 AM2 repliesview on HN

Yet another attempt to reinvent a better C. Curious, but unpractical. If one need a better C, C++ should be used instead.


Replies

nine_ktoday at 5:50 AM

C++ is like PHP: it used to be a terrible language, and you can still reach for everything terrible if you wish. But during last maybe 10 years, C++ made a lot of effort to become a language with fewer footguns and more safe, high-level tools.

Still I won't start a new project in C++. If I wanted high-level features and zero-cost abstractions, I'd take Rust. If I wanted working really close to hardware, do bit-twiddling and knowing where every byte is allocated, I'd take Zig. If I wanted to write a small piece of code intended to run absolutely everywhere, including old and esoteric architectures, I would still have to go with C (plain, old).

show 1 reply
lelanthrantoday at 6:50 AM

> Yet another attempt to reinvent a better C. Curious, but unpractical. If one need a better C, C++ should be used instead.

Those two languages are on the opposite ends of any complexity scale. Someone looking for a better C has a ton of options before getting to "lets use C++ and ask our devs to practice discipline".