drepl
drepl copied to clipboard
symbol rebinding
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.
Keeping track of symbols would allow to reference count the shared libraries and free them if all symbols are reused.
this bug prevents drepl from being usefull in jupyterd.