5 ms·
You might want to look into the way Unison does things: [1], they've got a lot of similar ideas and IIRC the way their hash system works avoids that ambiguity.
by alephaleph 3y ago
You might want to look into the way Unison does things: [1], they've got a lot of similar ideas and IIRC the way their hash system works avoids that ambiguity.
[1]: https://www.unison-lang.org/learn/the-big-idea/ https://www.unison-lang.org/learn/the-big-idea/
- surprisetalk 3y agoWow, that's a great guide! I didn't read it in-depth yet, but I think I had a previous implementation that worked very similarly to theirs. The problem with variable names is that they actually matter for some of the collaborative editor features I hope to implement in the future. There are certain assumptions I can't make quite yet, and so am keeping my options open :)
- pcl 3y agoHave you thought about using type aliases or higher order types of some sort for that instead of relying on the variable name? I could define that a familyname and a givenname are strings, and then a function argument of type familyname would be differentiated from a function argument of type givenname, but still the argument names themselves could be dropped from the hash.