Variable instances (Re: Trace on Variable assignment)

Sean Hinde Sean.Hinde@REDACTED
Thu Nov 9 16:35:57 CET 2000


> It's when you start having more than 3-4 changes of the same variable
> in the same function that it's easy to lose track.
> (Yeah I know it's a crummy way to write code in a single-assignment
> language, but I've run into so many examples where it's really tricky
> to come up with a better way.)

In my various peeks into the OTP sources I've grown quite used seeing the
Var0 Var1 Var2 progression, and also started to use it by default myself.

The issues brought up here seem to be readability and maintainability as
much as the avoidance of "potential" bugs of the kind noted in
application_controller. Maybe a note in some coding styles part of the
documentation (and/or new book) would go some part of the way to bring this
into the normal vernacular of Erlang, and help avoid Gats confusions.

http://www.erlang.se/doc/programming_rules.shtml#REF10726 could be updated
to start with..

- Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.





More information about the erlang-questions mailing list