[erlang-questions] node.js vs erlang

Loïc Hoguin essen@REDACTED
Thu Jun 19 01:30:02 CEST 2014


On 06/18/2014 10:22 PM, Kenneth Lundin wrote:
> That is what I meant, you are using a more complex setup with Erlang in
> order to get more features. So the comparision with other languages
> "simple setup" is not fair.

The setup is more complex but the way we get there isn't. Have you read 
the getting started chapter[1]? The release part is smaller than it 
would take to explain "erl -run" or "erl -s": we don't have to write 
extra code for it, we don't have to manually setup paths, we don't have 
to deal with reltool, and so on. It's literally "create relx.config, put 
this in it, run make again". Bam you got a release. That part can't get 
any simpler.

Erlang *is* more complex to use than many other languages (it is still 
simpler than C, C++ and the like though). Either you do things manually 
by downloading dependencies manually and such, or you use a build system 
like erlang.mk (or rebar) to automate things which requires you to 
create an OTP application.

Because erlang.mk automates the use of relx to build releases it is 
actually simpler to make a release than manually setup paths and 
whatnot. We just have to create the one file! We don't deal with reltool 
here, creating the release is *really* easier than not.

There's no simpler alternative to all that in the Erlang ecosystem. We 
will be able to make it a little simpler by having templates instead of 
making the user copy things, but the getting started chapter will not go 
down in length dramatically because of this.

We could remove all explanations to make it perhaps half the size it 
currently is, but then we removed all explanations. It's a chapter about 
getting started, it's supposed to provide initial pointers to users, not 
just get them to run an example and then ask themselves "now what?". We 
have actual examples for people that want that already.

I am not even sure what triggers all these good comments about the 
nodejs documentation. Sure it has a 6 lines and 1 command example on its 
front page. There's no denying that. Then what? A link to API docs. I 
have *no* idea how people manage to learn how to use it. Surely by using 
other resources than these, because while I'm confident I could run the 
front page example quickly, I am also confident that's about all I could 
do with it for a rather long time until I manage to figure out how to do 
anything meaningful, if I were to only use the official docs.

[1] http://ninenines.eu/docs/en/cowboy/HEAD/guide/getting_started/

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list