Re:Which companies are using Erlang, and why?
by vasilakisfil on Monday September 30, 2019 @02:18AM
(#21112226)
worked with Erlang lately in a side project, I think the actor model is really cool (and the FP style), but the error messages are not helpful at all (at least for a beginner), I wonder how other people manage.
[ Parent
| on HN ]
Re:Which companies are using Erlang, and why?
by fyfy18 on Monday September 30, 2019 @03:23AM
(#21112536)
Elixir gives you much more friendly error messages at runtime (I believe part of this feature was contributed to the Erlang VM, so improved it for all languages):
10:21:21.525 mid=1 [error] GenServer {Registry.WatcherManagerRegistry, 1} terminating
** (CaseClauseError) no case clause matching: {:ok, <snip>}
(core) lib/core/http.ex:64: Core.Http.request/7
(core) lib/core/monitors/built_in_monitor.ex:99: Core.Monitors.BuiltInMonitor.perform_request/1
(core) lib/core/monitors/built_in_monitor.ex:76: Core.Monitors.BuiltInMonitor.perform/1
(core) lib/core/watcher.ex:40: Core.Watcher.perform_check/1
(core) lib/core/watcher_server.ex:91: Core.WatcherServer.handle_info/2
Re:Which companies are using Erlang, and why?
by rapsey on Monday September 30, 2019 @02:24AM
(#21112247)
Runtime error messages or compilation error messages? I assume compilation. This is true. Compilation messages are bare bones.
But on the other hand the language compared to other modern languages is tiny and figuring out why something does not compile is a non-issue beyond an absolute beginner.
Re:Which companies are using Erlang, and why?
by joekinley on Monday September 30, 2019 @03:16AM
(#21112491)
More often than not after I did figure out what the error was, looking back at the initial error message it told me exactly what I should have looked at to begin with.
So, if you can read them right, they are pretty good.
I use Elixir in production and Erlang in side projects.
Re:Which companies are using Erlang, and why?
by samvher on Monday September 30, 2019 @02:49AM
(#21112358)
I'm using Erlang for a production system at work and I completely agree, the error messages tend to be terrible. Once you've run into many errors you start recognizing patterns though (part of the problem is that the errors are not English sentences but data dumps with indicators like `badfun`, these you just have to learn to interpret) and Erlang makes up for the bad error messages in other ways. But yes, often I end up reasoning through the code to solve the problem, with the error message only roughly pointing me in the right direction, to a larger extent than in other languages.