Hacker News new | past | comments | ask | show | jobs | submit login

I think the problem with Rust and most other languages, is illustrated by what Zig (for me) does right:

My main motivation for using Zig is that it's rapidly becoming a better C toolchain that GCC or Clang. So I'm extremely motivated to compile all my C code with Zig when it becomes possible. After that it's only natural to write more of my code in Zig.

So, my hypothesis is, a language that could replace C has to have a better C compiler built-in than existing C compilers.

Another side of this, is that it has to be extremely easy to use C from the new language and vice-versa. Something I also think Zig does mostly right.




This is a pretty good hypothesis given the history of C++.


I don't know about better, but at least almost as good of a C compiler built in seems like a big selling point. So that's, what, Objective C, C++, D, and Zig?

Perl has Inline::C that allows snippets of C code to be placed directly into Perl code like many C and Pascal compilers allow inline assembly. That's for interoperation and an occasional optimization of course, since Perl is in no way a C replacement for much of what's done in C. Do you foresee a replacement language having such inline sections, being a superset language like C++ or Objective C, or being able to just handle separate files/modules in separate languages?




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

Search: