Garth Goldwater
09/16/2019, 8:51 PMshalabh
09/16/2019, 10:20 PMshalabh
09/16/2019, 10:23 PMGarth Goldwater
09/17/2019, 4:46 PMAttemptStringConversion :: Any -> Maybe String
def AttemptStringConversion someData
perhapsCorrectFunction = Unison.Codebase.SearchBySignature((typeOf SomeData) -> String)
hopefullyString = perhapsCorrectFunction someData
switch hopefullyString
String -> Just hopefullyString
_ -> Nothing
Garth Goldwater
09/17/2019, 4:48 PMGarth Goldwater
09/17/2019, 4:48 PMshalabh
09/17/2019, 4:51 PMGarth Goldwater
09/17/2019, 4:54 PMGarth Goldwater
09/17/2019, 4:55 PMgman
01/08/2020, 4:15 AMimport {DoTheThing} from 'dth/v2';
Garth Goldwater
01/08/2020, 2:03 PMGarth Goldwater
01/08/2020, 2:07 PMGarth Goldwater
01/08/2020, 2:14 PMGarth Goldwater
01/08/2020, 2:15 PMGarth Goldwater
01/08/2020, 2:16 PMgman
01/08/2020, 3:48 PMrefactoring: i don’t think you’ve quite grasped how the system works. you might want to watch that part of the talk again? on every compile the names of your functions get replaced by codes generated from the compiled abstract syntax of their respective function bodies
so when you change the body of your add function and replace * with +, the ast of your add function changes, its hashed ID changes, and every instance of the word “add” gets replaced with a different hashID in your codethey showed distributed code so when machine A sees a hash for function newABC and machine B sees a hash for oldABC how does machine B know it needs to replace all oldABC hashes with newABC hashes. Or as another example would be pulling in someone else's updated library. Your code says a = #12456(b, c). The new library used to define #123456 but now only defines #123457. In any previous system pulling in the new updated library matches on name but in their system there is not match anymore. Your code is still referencing the old hash
conflicts: if you’ve seriously never had a problem with dependencies in javascript i’m not sure this value prop is going to appeal to youJS can function perfectly with zero conflicts unlike C/C++/C#/Java/Swift. You can make up conflicts by polluting the global namespace but that's on you. JS gives you way to make all modules not pollute any namespaces unlike C/C++/C#/Java/Switf. Back before Common JS, AMD and ES6 modules it was common to have that those conflicts. That pretty much all disappeared with CommonJS, AMD and now especially with ES6 modules. Any module that pollutes the global name space is shamed until they stop.
rename 1You don't have to be pranking to have those issues. You only have to have 2+ devs who rename things. A new problem has been added, one that didn't exist before. That problem is that from the programmers POV they can't look at a function name and know which function it is at a glance. They have to rely on the IDE to help them at best. This is a common complaint of C++ that there are so many invisible places in the language that can make it hard to really understand what the code is doing at a glance and because of that such a feature has been excluded from many languages in direct response to the problems it causes in C++. So adding a similar feature here doesn't sound like a win