Variable instances (Re: Trace on Variable assignment)

Ulf Wiger etxuwig@REDACTED
Fri Nov 3 12:45:16 CET 2000


On Thu, 2 Nov 2000, Klacke wrote:

>On Thu, Nov 02, 2000 at 04:29:23PM -0000, Sean Hinde wrote:
>> Hi all,
>> 
>> One of the things I really like in the Ericsson AXE-10 environment is the
>> ability to trace on changes to a variable. I've often found myself wishing
>> for this in the Erlang trace mechanism.
>
>
>Not much point in that ehh .... since we can't change the value
>of a variable ???

Of course, many variables are conceptually the same, except we create
a new instance:

X = foo(...),
X1 = bar(X),

Some people would prefer:

X = foo(...),
NewX = bar(X),


And the runtime system can't know that X1 is a modified version of X.

X = foo(...),  % [0] is implicit
X[1] = bar(X),
...

or perhaps 

X = foo(...),  % \0 is implicit
X\1 = bar(X),
...


would allow trace on "changes" to a variable, and also introduce a
standard way of describing something that occurs frequently in
most Erlang code I've seen.

/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