Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!uw-june!pardo From: pardo@cs.washington.edu (David Keppel) Newsgroups: comp.lang.misc Subject: Re: dynamic symbol binding Message-ID: <13199@june.cs.washington.edu> Date: 1 Oct 90 19:52:30 GMT References: <1653@seti.inria.fr> Reply-To: pardo@june.cs.washington.edu (David Keppel) Organization: University of Washington, Computer Science, Seattle Lines: 33 jml@bdblues.altair.fr (Jean Marie Larcheveque) writes: >To my knowledge, there is no language which allows you to >bind a symbol to an object created dynamically. >This would happen for example if C++ had a primitive alloc >with interface Type& alloc(Type). >Then we could write > >int& x = //... some initialization >//... >x = alloc int; //... previous lvalue of x is lost, > // perhaps deallocated As I undertand it, you want to be able to do something like (C hack): foo() { int x; int *ip; x = 5; ip = &x; &x = <> x = 6; assert (*ip == 5); } I think that most `dynamic' languages -- LISPs, Smalltalk, etc., let you do something like this. ;-D on ( My symbols in bondage ) Pardo -- pardo@cs.washington.edu {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo