You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flow has a global namespace at the moment, so there is no way to avoid that. From the FAQ:
Why is there a global name space?
Yeah, this sucks, but it is hard to fix. It requires changing not only the compiler and all
the backends, but also the debugger, the profiler and other similar tools. We originally
thought that we would have to fix this quickly to be able to work many people together, but
after many years of working with flow, it turns out not to be as bad. Of course, it is annoying,
and we want to fix it, but at the same time, in practice, there are also what we can call
collateral benefits. The most important is that any top-level name is unambiguous which helps
communication and avoid mistakes.
However, it might be something we will try to tackle.
alstrup
changed the title
How to prevent definitions leaks from imports?
How to prevent definitions leaks from imports? (namespace is currently global)
May 6, 2019
defined a function called
sum
.Compiler errors on "Duplicate name 'sum'" if I
import fs/filesystem
;No error if not importing
fs/filesystem
;2 issues here.
How to avoid importing everything in
fs/filesystem
when I want to import only selected ones?Worst, seems like
sum
was leaked fromfs/filesystem
due to it importing:math/md5 -> math/bits -> math/math where
sum
was defined.The text was updated successfully, but these errors were encountered: