Someone wrote in [personal profile] diziet 2022-12-22 09:18 am (UTC)

Can´t really see the issue

I see some issues with your conclusion. You indicate that we humans have limited attention but quite frankly there are a numerous amounts of constructs that require our attention in Rust and I fail quite a lot to do so yet it would not be adequate to just add macros that does some magic .... luckily we have the compiler, the Rust compiler with its great error messages solves any problems with out lack of attention and makes us take explicit decisions.

I find all the examples without the Ok to be less readable and if I had to maintain such code I would have problems having to discern when values are being packaged to be returned. Having the Ok construct makes thing quite easier. Specially if people are going to have huge match statements that actually output the function's result.

I rather have things explicitly and being reminded by the compiler than implicitly and then wondering why things are not working out to then have to deal with a Macro that is doing stuff to my code...

Luckily we have crates (would not make this statement in C/C++ land) and if you want this kind of magical macros you can just import it as you do now.

Post a comment in response:

(will be screened)
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting