3 ms·
Does that actually solve name clashes? If I have two functions compiled at the same time: def foo(n): return n + 2 def foo(n): return n * 2 foo(3
by Jtsummers 3y ago
Does that actually solve name clashes? If I have two functions compiled at the same time:
def foo(n):
return n + 2
def foo(n):
return n * 2
foo(3) # which one is called?
(I don't know Unison syntax so using Python for the example)
It's still a name clash at compile time.
- chuckadams 3y agoTBH I've only dipped my toe into Unison, but I don't believe it would let you re-bind the same identifier in the same scope in the same compilation unit. It's more that `foo(3)` becomes a call to the hashed version `#e0ca5f(3)` forevermore. Once a function has been compiled, it doesn't care what the names of any functions it uses are afterward, until you explicitly recompile them to use the new names. So it really has more to do with preventing versioning conflicts ... others can explain it much better than me, sorry.