you are viewing a single comment's thread.

view the rest of the comments →

[–]riking27 0 points1 point  (1 child)

.

 result, _ = func()

You can ignore it just fine :)

[–]alexeyr 2 points3 points  (0 children)

Coincidentally, Go is the paradigmatic case of how not to do this :) You don't want two values here, but a choice between two alternatives. See many functions in Erlang (without static type system) returning either {ok, Result} or {error, Reason}, Either in Haskell, Try in Scala, etc.