drepl icon indicating copy to clipboard operation
drepl copied to clipboard

symbol rebinding

Open MartinNowak opened this issue 11 years ago • 2 comments

It should be possible to rebind previous declared symbols to something else.

string foo = "bar";
int foo = 3;

This requires to keep track of declared symbols and excluding rebinded symbols from the imports.

module _mod1;

string foo = "bar";
module _mod2;
import _mod1 : foo;

int foo = 3;
module _mod3;
import _mod2 : foo; // doesn't import _mod1 : foo

//

Using selective imports allows to correctly implement function overload. In that case both selective imports are present.

MartinNowak avatar Feb 12 '14 19:02 MartinNowak

Keeping track of symbols would allow to reference count the shared libraries and free them if all symbols are reused.

MartinNowak avatar May 27 '16 12:05 MartinNowak

this bug prevents drepl from being usefull in jupyterd.

lindt avatar May 11 '19 15:05 lindt