News for hackers. Stuff that matters.
Re:IBM to buy HashiCorp in $6.4B deal by hughesjj on Wednesday April 24, 2024 @10:04PM (#40152492)
I've never gotten the explicit argument. Java checked exceptions are also part of the function signature/interface and nothing prevents one from making a language where all exceptions are checked then just doing

    try {
       maybeError := FunctionThrowingValueError()
    } catch (ValueError e) {
       // do stuff
    }
I get at the end of the day it's all semantics, but personally I kinda like the error-specific syntax. If you want to do the normal return path, that's fine, but I prefer the semantics of Rust's Result type (EITHER a result OR an error may be set).

To each their own, it's not something I really worry about.

Re:IBM to buy HashiCorp in $6.4B deal by freedomben on Thursday April 25, 2024 @08:35AM (#40156742)
Yeah same, Go's explicit argument never resonated with me either. In Elixir it's similar to a Result type, being a tuple such as either `{:ok, return_val}` or `{:err, err_msg}`, which is perfect for using with `case` or `with` depending on your situation.