Re:Where does the name "algebraic data type" come from?
by derriz on Wednesday July 31, 2024 @12:20PM
(#41120558)
I’m pretty sure Miranda did not allow the user to directly define term rewriting rules for algebraic data types. Obviously this is from decades ago so my memory could be faulty but I used it a lot for a year or two and do not remember that feature.
[ Parent
| on HN ]
Re:Where does the name "algebraic data type" come from?
by syrak on Wednesday July 31, 2024 @12:50PM
(#41120862)
That's surprising! I (author of the blog) just repeated what's in the 1985 paper.
The feature might actually have been removed, or never even been implemented. One would have to find an implementation to check.
Re:Where does the name "algebraic data type" come from?
by derriz on Wednesday July 31, 2024 @02:24PM
(#41121828)
Could be. This overview from the end of 1986 - https://www.cs.kent.ac.uk/people/staff/dat/miranda/Overview.... - fairly matches my recollection of the language and doesn't mention such a feature.
Re:Where does the name "algebraic data type" come from?
by syrak on Wednesday July 31, 2024 @03:27PM
(#41122538)
Thanks! Here we go:
"Note: In versions of Miranda before release two (1989) it was possible to associate "laws" with the constructors of an algebraic type, which are applied whenever an object of the type is built. For details see Turner 1985, Thompson 1986. This feature was little used and has since been removed from the language. "
Re:Where does the name "algebraic data type" come from?
by derriz on Wednesday July 31, 2024 @04:08PM
(#41122936)
Cool - mystery solved!
Re:Where does the name "algebraic data type" come from?
by 082349872349872 on Friday August 02, 2024 @01:35AM
(#41136359)
fwiw I unwittingly retrod this path; looking back at early versions of my algebraic type library there were all sorts of provisions for automatic smart constructors (commutativity, identities, etc., surely inspired by Goguen) that got dropped from later versions for lack of use.