isovector / reasonablypolymorphic.com

⏳ my math blog
http://reasonablypolymorphic.com
BSD 3-Clause "New" or "Revised" License
23 stars 11 forks source link

blog/bialgebras/ #22

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Review: Sorting with Bialgebras and Distributive Laws :: Reasonably Polymorphic

https://reasonablypolymorphic.com/blog/bialgebras/

jegi commented 2 years ago

Apropos your opening comment: "All sorting functions are extentionally equal — so the work being done here is necessarily below the level of equality. This doesn’t jive well with how I usually think about programming, and has made it very hard for me to see exactly what the purpose of all of this is. But I digress." My view of the purpose is that you care about more aspects of programs than just extensional equality, ie the input-output behaviour. Obviously you care about performance too; but that's mostly not this work is about. What it is about is that you also should care about program structure: a well-structured program that solves a given problem is better than spaghetti code that happens to do the same thing. That's why refactoring is a thing. Moreover, two different well-structured programs for the same problem may give you two different insights into what is happening.

isovector commented 2 years ago

Hi Jeremy. That's a helpful lens on this work, thank you!