[erlang-questions] A style question

David Mercer dmercer@REDACTED
Fri Feb 12 16:02:34 CET 2010


> But is this just prejudice on my part, or is there a reason why inserting
> an opaque name like "F" is a good idea?

I might assign a value to a variable for documentation purposes.  In this
specific example, though, the name "F" seems to fail as a description of
purpose, so it probably doesn't fall into that category.  Suppose, however,
that it were something like

	UpdateTheFebblebrokker = fun() -> ...
	Mnesia:transaction(UpdateTheFeeblebrokker)

Then it might server as a form documentation, written with the optimistic
assumption that the compiler will optimize the assignment away.

> The indentation style I would use here just takes 4 columns, not 12.

I would love to hear about different indentation styles, and specifically
yours.  I find properly indenting Erlang to be the most difficult part of
the language.

Cheers,

David



More information about the erlang-questions mailing list