[erlang-questions] Reassigning variables

mats cronqvist masse@REDACTED
Thu Mar 19 21:24:16 CET 2009


Camille Troillard <tuscland@REDACTED> writes:

> On Thu, Mar 19, 2009 at 4:31 PM, mats cronqvist <masse@REDACTED> wrote:
>
>      I find it interesting that readability is regarded as something only
>     pointy-headed academics are interested in, and uninteresting in the
>     real world of commercial software.
>    
>      In my experience, code that is not "aesthetically pleasant" is
>     guaranteed to have this property; only its author can find the bugs.
>
> Alright, let's put it that way:
> I'm not saying that one should be content with hard to read code.
>
> Remember the purpose of this thread is to discuss destructive assignments?
>  Erlang is born with pattern matching, and non destructive assignments.  I
> don't understand why it is a quality to pass around this very quality, that
> makes the language better at the price of readability.

  You lost me here. I consider non destructive assignments a huge asset. 

> I've spent myself lots of time design macros and 'elegant' stuff to please my
> eyes.  In the end I eventually found that it was even more code to maintain
> and understand.

  My code wasn't supposed to be elegant. It was upposed to put the
  focus on the essence of that function; that we're threading a
  dictionary (X) through a bunch of functions.

>      This is of course not a problem for a hobbyist, or perhaps even a
>     compiler writer.
>
> I'm sorry Mat, but this assertion is very closed minded.

  Not so well put, I guess. I just meant that the readability of the
  code becomes more important the more people are involved in the
  project.

>     But it is the mother of bad software products.
>
> I agree that easy to read code is better for maintainability.
> But this thread has yet to prove that the very solutions being searched for
> readability have actually a interest in maintainability.

  I'm not sure what you're getting at here.

  mats



More information about the erlang-questions mailing list