From 869444cec6aa1925bf72f11909efc048a239f849 Mon Sep 17 00:00:00 2001 From: dumblob Date: Tue, 5 May 2020 11:37:44 +0200 Subject: [PATCH] doc: fix wording for "return none" --- doc/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/docs.md b/doc/docs.md index 5bab6bb9f7..9729a0aad5 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -988,7 +988,7 @@ V combines `Option` and `Result` into one type, so you don't need to decide whic The amount of work required to "upgrade" a function to an optional function is minimal: you have to add a `?` to the return type and return an error when something goes wrong. -If you don't need to return an error, you can simply `return none`. +If you don't need to return an error message, you can simply `return none` (more efficient equivalent of `return ""`). This is the primary way of handling errors in V. They are still values, like in Go, but the advantage is that errors can't be unhandled, and handling them is a lot less verbose.