🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1642

Re: dynamic symbol binding

#1642
From: David Keppel
Date: Mon, 01 Oct 1990 19:52
33 lines
1337 bytes
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 = <<reallocate>>
	    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
Technical Details
Message-ID: <13199@june.cs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!uw-june!pardo
References: <1653@seti.inria.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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