[erlang-questions] Reassigning variables

Ulf Wiger <>
Thu Mar 19 14:08:44 CET 2009


Camille Troillard wrote:
> I find interesting (or curious) how people want to
 > reach aesthetically pleasant code to read.  No
 > offense, really, it's just that I don't think
 > it leads anywhere useful.

Let me quote Richard O'Keefe, so he won't have to
repeat himself:

   Elegance is not optional

I think making the code aesthetically pleasing is
extremely important. To paraphrase Sir Tony Hoare,
who spoke at QCon last week, software tends to live
much longer than we would like.

Reading other people's programs is difficult to begin
with, even if they have made an effort to make the
code readable. In many cases, no such effort is
apparent to the reader.

> In my opinion, while this is interesting in 
> a "code beauty" aspect, it serves no useful purpose
 > to overload the code with macros, helper functions,
 > and other language candies that just try to solve
 > a specific problem.

Overloading with macros seldomly helps readability.
Helper functions can, if carefully chosen.

And I think this problem is common enough that it
deserves some effort.

BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com



More information about the erlang-questions mailing list