[erlang-questions] node.js vs erlang

Loïc Hoguin essen@REDACTED
Fri Jun 20 17:10:01 CEST 2014


On 06/20/2014 04:47 PM, Leonard Boyce wrote:
> On Fri, Jun 20, 2014 at 9:06 AM, Loïc Hoguin <essen@REDACTED> wrote:
>> I mean what.
>
> It's not a holy war :)

That was just my reaction, sorry. A more polite kind of "What the .. are 
they doing?".

I feel I should write a detailed explanation of my workflow somewhere. 
Too often do I read people having too many issues than they should. My 
workflow isn't perfect by any means, but it probably wouldn't hurt to 
put it into words. (rebar users be damned though, because I don't use it.)

> They are using Sublime as that's their editor of choice.
> When I started learning Erlang I was informed that the 'defacto'
> standard for indentation is the indentation used by elang mode for
> emacs as this was the primary erlang editor. Maybe I was misinformed,
> but that became our coding standard. Others developers use emacs or
> ElrIDE (which uses the same indentation as emacs). No other 'popular'
> editor correctly supports the 'emacs style' indentation for Erlang.
> Maybe it's just me but I like consistency and my mind is 'trained' to
> match this indentation format.

The standard is "indent the same as the code around your change". True 
not only for third party projects but also for OTP code.

> Thank you. This is something which is not really covered as an "Erlang
> best practice" in anything I've seen to date. My guys want to write
> tests for every possible return from every single function. I'm even
> seeing tests which are actually testing returns from OTP function
> calls.

If you really want to test all possible cases you should take a look at 
property based testing, but beware of the learning curve.

> Maybe someone smarter can point out the error as I certainly cannot see it :(

I do not see it, but if I had to guess I'd say it generates the PLT 
every time.

By the way, shameless plug if you like makefiles: 
https://github.com/extend/erlang.mk

> And yet the 1st documentation link on http://www.erlang.org/doc.html
> (the title "Erlang/OTP documentation")  is to the *non* searchable
> version http://www.erlang.org/doc/.
> Yes, right in that paragraph is a link to the searchable version, but
> if they already have the link to what they're looking for, why would
> they even bother reading that paragraph.

I am not disagreeing with you there, switching the links out would 
definitely be better.

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



More information about the erlang-questions mailing list