Comment

Comment by fragmede

> In the case of an error in the main function, the process will exit with 1, otherwise 0. The main function can also return a value directly (return type u8 / !u8).

We know that by convention, but how do we know that from

    pub fn main() !void {
If if write

    pub fn foo() !void {
will that function also get to return a u8?

Also, what happened to argv/argc?

parent fragmede 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton