7 ms·
> Why doesn't it have… Perhaps because it wasn't intended to be used for everything — "What sort of problems is Erlang not particularly suitable for? … Most
by igouy 7y ago
> Why doesn't it have…
Perhaps because it wasn't intended to be used for everything —
"What sort of problems is Erlang not particularly suitable for?
…
Most (all?) large systems developed using Erlang make heavy use of C for low-level code, leaving Erlang to manage the parts which tend to be complex in other languages, like controlling systems spread across several machines and implementing complex protocol logic."
http://erlang.org/faq/introduction.html#idp32114576 http://erlang.org/faq/introduction.html#idp32114576
- chrisseaton 7y agoThis seems like an argument being made backwards. > Most (all?) large systems developed using Erlang make heavy use of C for low-level code But they use C... because Erlang is too slow. Erlang isn't slow because they use C. This is actually an argument for the need to make Erlang faster - we've got proof it's not fast enough for what they want to do! And the worst thing is that when you start to use C code it's them a self-fulfilling prophecy - you can't optimise your Erlang code because it's now lots of calls to native code. I wrote my PhD on this problem.
- zzzcpan 7y agoIsn't that how all scripting languages became viable, they provided fast C extensions where it mattered the most. I.e. dropping to C for performance is by design.
- chrisseaton 7y agoYes it made sense at the time. But now look at Ruby where they're trying to add a better GC and JIT because people want more speed - they're severely restricted in their options by the design of the C extension API.
- deleted 7y ago[deleted]
- dragonwriter 7y ago> But they use C... because Erlang is too slow. Erlang isn't slow because they use C. Erlang can and does focus on solving problems like distribution, concurrency, and managing high-level issues in distributed concurrent systems because speed within a single sequential task is an adequately solved problem, and the existing solution can be leveraged in systems using Erlang for higher-level concerns. So, no, it's not wrong to say Erlang is slow because of the use of C for speed in Erlang systems.
- igouy 7y agoSeems like an intentional separation of concerns. > But they use C... because They use C because they think it's a good tool for some things. http://erlang.org/doc/tutorial/c_port.html http://erlang.org/doc/tutorial/c_port.html