> The difference seems to be that Go has a preferred way to do it: explicit case analysis and early returns.
> The difference seems to be that Go has a preferred way to do it: explicit case analysis and early returns. In other words, there is no way to abstract over the case analysis in Go. It sounds like you're saying this is a good thing. I think it's bad. > ... apparently the Rust folks can't make up their minds Wow, I'd say the opposite. In Go, the only thing all `error` objects have in common is the `Error()` method, which returns a description. If you want to investigate the causal chain of an error (to achieve what stack-traces give you in languages with exceptions), there is no standard way , even for errors in the standard library. Some errors are basically just strings, others are structs with other fields that you can access by using runtime type assertions. Rust, on the other hand, has the `Error` trait, which includes a `cause` method, returning the underlying error if one exists. This alone seems to me like an improvement in consistency over Go.
Posted by maxbrunsfeld on May 14, 2015, 6:10 PM
Tags
Related issues
- That isn't really relevant for the tool starting the container.
- Why is there no link to the source?
- Something I wonder about in this domain is if this is the fault of the language.
- Namespace pollution is an annoying problem in Rust.
- Currently, no language ports of Timefold Solver are planned.
- I agree with you, almost all .NET code I write is within the .NET framework, yet when I look at C# repos, it's disheartening to see so ma...
Raise real-world problems, find people facing the same issue, and discuss solutions.6,500 issues0 comments
hackernews (Software)
That isn't really relevant for the tool starting the container.
Why is there no link to the source?
Something I wonder about in this domain is if this is the fault of the language.
Namespace pollution is an annoying problem in Rust.
Currently, no language ports of Timefold Solver are planned.
I agree with you, almost all .NET code I write is within the .NET framework, yet when I look at C# repos, it's disheartening to see so ma...
Why is there no simple workaround for this?
I have been using https://github.com/jacktasia/dumb-jump to quickly jump to definitions.
> The difference seems to be that Go has a preferred way to do it: explicit case analysis and early returns.
> The difference seems to be that Go has a preferred way to do it: explicit case analysis and early returns. In other words, there is no way to abstract over the case analysis in Go. It sounds like you're saying this is a good thing. I think it's bad. > ... apparently the Rust folks can't make up their minds Wow, I'd say the opposite. In Go, the only thing all `error` objects have in common is the `Error()` method, which returns a description. If you want to investigate the causal chain of an error (to achieve what stack-traces give you in languages with exceptions), there is no standard way , even for errors in the standard library. Some errors are basically just strings, others are structs with other fields that you can access by using runtime type assertions. Rust, on the other hand, has the `Error` trait, which includes a `cause` method, returning the underlying error if one exists. This alone seems to me like an improvement in consistency over Go.
Comments (0)
No comments yet. Start the discussion.