News for hackers. Stuff that matters.
Re:Unison Programming Language by refried_ on Monday June 28, 2021 @12:10AM (#27658080)
Hello, Unison author here.

This is definitely an issue that is real, and is currently a problem, and that we will fix; probably by giving the function author an option to salt the hash of new definitions that have some semantic meaning beyond their implementations (appropriate for most application/business logic). No salt for definitions whose meanings are defined by their implementations (appropriate for most generic "library" functions like `List.map`).

We already make this distinction for data types, but not yet for value/function definitions.

Re:Unison Programming Language by billytetrud on Monday June 28, 2021 @08:49AM (#27661227)
Why not simply record where each reference occurs and ensure that if one definition is modified, the other is not? The programmer shouldn't have to think about salting any hashes, it should be automatic and hidden under the hood.
Re:Unison Programming Language by vanderZwan on Monday June 28, 2021 @03:12AM (#27658906)
Why not also show that your definition already exists elsewhere, together with with a warning? Or is it doing that too?
Re:Unison Programming Language by dcposch on Sunday July 11, 2021 @12:13AM (#27798417)
Nice, makes sense!
Re:Unison Programming Language by hota_mazi on Monday June 28, 2021 @01:07PM (#27664471)
This seems to be very developer hostile.

Not only do they have to provide a salt themselves but on top of that, they need to make a judgment call of when something has "more semantic meaning beyond their implementation" (to use your words) rather than being some more "fundamental" code.

I'm also surprised that you haven't solved this problem yet: at least once a day, IDEA warns me that some portion of my code is duplicated exactly in some other area of my code, so this kind of duplicated logic is already quite common.