help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Richard M. Stallman says GNU/Linux, but Rust lang ecosystem is growi


From: Konstantin Kharlamov
Subject: Re: Richard M. Stallman says GNU/Linux, but Rust lang ecosystem is growing.
Date: Sun, 07 Apr 2024 10:45:23 +0300
User-agent: Evolution 3.52.0

On Sun, 2024-04-07 at 07:27 +0000, 馬 冰 via Libc-help wrote:
> Rust already allows main function returning Result<T, E>, e.g. fn
> main() -> Result<(), std::io::Error>{Ok(())}, so I think the
> operating system should accept Result<T, E> instead of int, i.e.,
> value returned from int main(){}. 

Nothing needs to be modified. AFAIU `main()` in Rust "returns" a Result
simply to facilitate using "question mark operator" inside `main`. But
it's just an adapter from internal API to one operating on `int`s, i.e.
`Ok()` will be converted to `0`, and an error will be converted to
another number. Current API is fine (and as a side note, the "question
mark operator" unfortunately doesn't exist in most languages. Offhand
Haskell have similar feature, Idk of any other langs).

> How to write patches for LLM? What's LLM?

LLM is a "large language model". The author was referring to the email
possibly being written by an artificial neural network. Although Idk
what's the ponit, but then again the OP didn't reply to this point, so
there may be something to that hypothesis.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]