Hacker News new | ask | show | jobs
by PasserBy2020 2541 days ago
Comparing Erlang to C# is a bit unfair. The latter is a general purpose language that can be used to build software on every layer of every platform. The former is a distributed programming DSL (an awesome one granted). There is 0 Erlang-native GUI libraries, there is no documented Erlang pipeline for iOS apps etc.
2 comments

> The former is a distributed programming DSL (an awesome one granted)

I mean, that's a completely incorrect characterization of Erlang, regardless of how you feel about the comparison to C#.

Erlang is just as much a general purpose language as C#, it is just a different paradigm, i.e. functional programming rather than (mostly) object-oriented.

> There is 0 Erlang-native GUI libraries

This isn't true at all. There is a tight integration with the wxWidgets framework (in fact, one of Erlang's handiest tools is built with it, Observer). Scenic, as mentioned elsewhere in the comments, is for Elixir (perhaps there is an Erlang-native API for it, not sure), but provides a native framework for OpenGL, and a UI paradigm that meshes nicely with processes and supervision.

Of course, Erlang is not perfectly suited for all environments (e.g. iOS apps), but that is true of essentially all general purpose languages - there are some places where they aren't well suited or have flaky support. I wouldn't build an iOS app in C# either, it makes little sense to use anything other than Swift/Obj-C in that environment. Likewise if I'm primarily building Windows-based apps, I would use C# before I would reach for Erlang. But for backend services, infrastructure, networking, etc., it is extremely well suited, and I think the domains that it can provide a compelling solution for will continue to grow (e.g. embedded).

> There is 0 Erlang-native GUI libraries

Have you seen ex11? [1], it's Erlang native, and at least 0.1 of a GUI library. X11 and Erlang actually go together really well, although a lot of important functionality for a real application is missing; I used this to display images generated by an Erlang application, and it felt a lot nicer to me than using wxWidgets; I added a few bits of functionality to the library while I was in there, and it wasn't that hard to turn the X11 protocol docs into Erlang code for the things I needed.

I imagine if someone had a real need here, it wouldn't be that hard to get it into shape. Caveat: X11 is dying, etc.

[1] The most active fork appears to be here https://github.com/skvamme/ex11 -- it's been somewhat retargeted to mobile, but the examples for desktop should still work as well as they did.