Variable instances (Re: Trace on Variable assignment)

Ulf Wiger etxuwig@REDACTED
Fri Nov 10 10:36:09 CET 2000


On Thu, 9 Nov 2000, Vlad Dumitrescu wrote:

>> 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.
>
>It's not so easy (especially into code written by someone else) to keep
>track of X[1],... X[5] either...

Yeah, well I'm not thrilled about the look of it either. I was kinda
hoping that someone would come up with a better syntax. My general
thrust was that a Lint program should be able to determine
_unequivocally_ that one variable is a newer version of another one.

Simply using a naming convention doesn't really cut it when projects
get sufficiently large, in my opinion. Besides, the convention is
already polluted, since patterns like ([H1|T1], [H2|T2]) are used
quite frequently.

But I agree that giving the problem some attention and agreeing on a
convention (I'd vote for Robert's Style), would be an important step
in the right direction.


/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list