[erlang-questions] Request feedback on example project
Wed Feb 3 07:33:57 CET 2016
On Wed, Feb 3, 2016 at 7:00 AM, zxq9 <> wrote:
> I would like feedback from new and old Erlangers in terms of readability,
> documentation, what is easy to understand, what is hard to understand, etc.
> My goal is to develop a style plain enough that a utility application just
> above the threshold of clear triviality (like a UUID utility) is mostly
> understandable even to someone new to Erlang.
After a quick look, I have only one nit to pick
(and it is of course a matter of taste):
when V > 0 andalso V < 6 ->
I would write it like:
when 0 < V, V < 6 ->
First, by putting the variable V in the middle it
easier to see that the guard is a range test
and not any two unrelated conditions. Second,
I never use 'andalso' when a simple ',' would do.
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions