Saturday, June 13, 2015

Log 061315

Suppose A0 and A1 define "". Suppose B0 imports A0 and B1 imports A1 and use "". Suppose C imports B0 and B1.

I can solve that B0 and B1 bind correctly to "" during typechecking. But then I just shifted the problem to the linking phase where it'll turn out "" gets imported from two different files.

I can also solve that by fully qualifying "" with the file in which it is defined. But then what if A0 and A1 are also named the same but live in two different paths? I would also need to fully qualify each identifier with both the filename as well as the path.

So. I am not going to solve this. Programmers will need to make sure all identifiers for a project live in different namespaces/don't overlap. Everything is solvable but this simply isn't worth it.

It's a feature, not a bug.

No comments:

Post a Comment