3 ms·
Multiple return is great, though sending a tuple back is how we've been doing it in erlang for 20 years. Not much difference between {foo, bar} and (foo, bar).
by 20yrs_no_equity 10y ago
Multiple return is great, though sending a tuple back is how we've been doing it in erlang for 20 years. Not much difference between {foo, bar} and (foo, bar).
Go's error handling however is terrible, absolutely the worst and its tendency to panic is atrocious. Especially without supervision or restart capability. HEre's a spot where elixir has it right and is vastly superior.
- grey-area 10y agoI have large go programs in production for several years which have never panicked from the first line of code written. Go's error handling is perhaps simplistic but it doesn't encourage the use of panic, quite the reverse. I'd be happier if panic didn't exist, but it is extremely rare in real world programs and the std lib.