V Forum

[ log in ]

Multiple Return Values

nodrygo 2019-04-13 07:24
does V provide multiple values binding like GO ?
rsp, err := http.Get(STORIES_URL)
medvednikov 2019-04-13 08:47
Not yet, but it will soon.
ntrel 2019-04-15 11:36
Also, in V functions should return an optional result instead of returning both a result and an error. Optionals ensure both can't be accessed, as only one is valid.
medvednikov 2019-04-15 11:45
Good point @ntrel, forgot to mention that.

About 90% of Go code uses multiple return values for error handling.
medvednikov 2019-12-08 14:03
V now has this.

Powered by Vorum, open-source blogging/forum software written in V