4 ms·
In programming language theory there are two ways to represent programs: * data, which has intensional equality (you understand it by what it is) * codata, wh
by noelwelsh 2y ago
In programming language theory there are two ways to represent programs:
* data, which has intensional equality (you understand it by what it is)
* codata, which has extensional equality (you understand it by what it does)
For data think data in a normal programming language. (Algebraic data types, if that means anything.)
For codata think functions (or objects).
These are duals, meaning you can map on to the other. If you have a design using data you can transform it to codata and vice versa.
This opens up a lot design opportunities by exploiting this duality. There is more in the book I'm writing if this is your kind of thing: https://scalawithcats.com/ https://scalawithcats.com/
- turtleyacht 2y agoThe newsletter link at that page may not be working. Maybe the book is finished, though? The error message is No newsletter with the name of scalawithcats
- noelwelsh 2y agoThanks for letting me know! I've fixed it now. The (second edition of the) book is very much in progress.