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

I don't really understand this question. We're talking here about the canonical "Hello, World!" program in each language.

In C that program is written in K&R. In Rust (like several modern languages) that program is provided automatically as a placeholder when you start a new project.

The C program, as I explained, just presses on anyway if there's an error. For example if the standard output on your Unix terminal leads to the full device, that's ignored and the program exits with a success indication.

The Rust program, of course, will panic, and the program exits with a failure indication (if your standard error leads to somewhere the panic report will be sent there unless you've asked for panic to abort)

It's a difference of convention. The convention in Rust is that we should care whether things fail, and if we don't know what to do about them failing we should panic.



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

Search: