Go is mostly imperative, functions returns a nullable string for errors, like in some C APIs. Elixir is mostly functional, often APIs follow {:ok, data} on success, {:error, message} with message being a string on error.
I guess the OOP-style is raising exceptions, which is a model I hate even more than returning integers because then it's impossible to know that errors are handled when they should.
@lanodan Yeah that what I was talking about. I find returning negative integers to be weird, but most of my experience is OOP, but I understand why people hate it.
@xianc78 Well, returning non-zero integers or returning a NULL pointer and checking errno (which isn't thread-safe btw) is quite C-specific in my experience.
Only other one I know with (unsigned) integers for errors is shell and that's a whole other kind of mess.