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

[flagged]


No, for the foreseeable future (20-30 years) C will still be 10x larger than Rust in code and deployments...


Eh more like C++, Zig is more of a modern C


10000x


Call me when Rust becomes the interface to the most used kernel in servers and supercomputers.


I wouldn't call syscalls anymore "C" than "Rust". Neither language can make them without library support or inline assembly. Both can with.


A kernel's interface isn't necessarily syscalls. On macOS libSystem's C API is the API of the kernel, because syscall stability is not guaranteed.

On the other hand, pretty much every kernel has a C API.


I think the parent comment was less about the capability of Rust, but more about the overwhelming momentum that C has.


And on that I'd fully agree with him.

My comment also isn't really a comment about rust. It's about a common misconception that the unix/linux kernel somehow talks in "C".

Libc talks in C, most of the other libraries talking for interfacing with the kernel talk in C. The kernel speaks it's own language that has no special relation to C at all.


Except that you'll be hard pressed to find a syscall without an accompanying C library. It's common for other languages to build upon that rather than call the syscalls directly. Specially during the early days of a new kernel feature.


Could we not do this, please?



Why?


This article has nothing to do with Rust. Bringing Rust up like this is inappropriate, and looks bad on the Rust community. It fuels an "us vs them" mentality, and doesn't win over any hearts nor minds. It often hardens them, instead.


This phenomenon is the Rust Evangelism Strike Force (same as/similar to rust jerk?).

I like rust. I think it may be able to obsolete many/most uses of C some day. But I will concede that folks go overboard w this sometimes.


In terms of overall language design and semantics, Rust owes a lot more to ML. I'm not sure there's really much of anything that it owes to C.

Agreed with the commenter elsewhere in this thread that Zig seems like a more reasonable contender for a modernized descendant of C.


I'd argue that Rust is much closer to C++ than to C or ML.

Rust was designed by C++ programmers, to replace code that was previously written in C++. The concept that most guides its design is the idea of "zero cost abstractions", which a very C++ thing as well. ML doesn't mind if abstractions have a cost, while C is a smaller and more spartan language.


>I'm not sure there's really much of anything that it owes to C.

Rust's default behavior of ignoring integer overflows when not in debug mode -to put an example-, put it very close to C.


The difference is that it’s well defined as two’s compliment overflow instead of UB. That’s a big difference.


I like Rust, but [this](https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-repl...) blog post treats the topic of C replacement well. Rust is a C++ replacement.




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

Search: