Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If Zig can settle in the niche that C is used for today

That niche is "code that needs to be portable to any system with a C compiler", or "... to a particular system that only has a C compiler" so i am not sure it can.

There are lots of projects using C that aren't in that niche, but i don't believe there is a good reason for any of them to be using C over C++ these days. It's either history, inertia, or Luddism.



> ... for any of them to be using C over C++ these days.

That's the old (and frankly: tiresome) mindset that C++ is a successor and improvement of C. After using "modern C" (as in C99 or later) for a while it becomes quite obvious that this isn't the case anymore, instead C++ was a fork of C and developed into a very different direction (including developing the original C subset into a non-standard C dialect). Especially with more recent C++ standards, C and C++ have become different languages with very different goals.


> That's the old (and frankly: tiresome) mindset

It really isn't. It's based on comparing the languages as they exist today. C++ is vastly more productive.


C++ is also faster thanks to template specialisation and the quick way you can make the right data structure.


Zig has high interoperability with C and plans to have a C backend as well.

https://github.com/ziglang/zig/issues/3772




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: