Tim Humphries@thumphriees·Oct 16, 2017overloading is overrated, laws aren't https://twitter.com/mxavier/status/920050260919042048…This Tweet is unavailable.314
crow emoji@glaebhoerl·Oct 17, 2017By the way is there any reason you couldn't attach laws to just like, a record of functions? Why are classes special?44
Cyrus Omar @ VL/HCC in Rome@neurocy·Oct 17, 2017You're on to something very fundamental about type classes ;-)11
crow emoji@glaebhoerl·Oct 17, 2017What is it? (Not sure if I should be thinking in the direction of "they're actually not special" or "they're more special than I think!")21
Brendan Zabarauskas@brendanzab·Oct 17, 2017Type classes are just a fancy, built-in way of passing records of functions around implicitly. Alas, they live in a separate language space.12
crow emoji@glaebhoerl·Oct 17, 2017Yeah; I'm kind of hoping @neurocy has something more profound or subtle in mind :)13
Cyrus Omar @ VL/HCC in Rome@neurocy·Oct 17, 2017I mean nothing too profound -- type classes tie "laws" to type-directed implicit arguments in a way that mystifies the two distinct concepts24
Cyrus Omar @ VL/HCC in Rome@neurocy·Oct 17, 2017in ML signatures specify an interface -- over both types and values -- and you can associate laws with the signature. much neater imo!2111
Graydon Hoare@graydon_pub·Oct 17, 2017Tbh part of me regrets not having a sufficiently-strong set of counterarguments ready at the time, against the push for traits in Rust.25
Brendan Zabarauskas@brendanzabReplying to @graydon_pub @neurocy and 2 othersTbh I do prefer the 'programming with interface constraints' feeling I get using TCs. I would prefer traditional TCs over ML modules…11:48 PM · Oct 17, 2017·Twitter Web Client1 Like
Brendan Zabarauskas@brendanzab·Oct 17, 2017Replying to @brendanzab @graydon_pub and 3 othersFor something like Eq, I really want implicit module passing. Damnnit if I'm gonna pass around/instantiate that module manually.1
Cyrus Omar @ VL/HCC in Rome@neurocy·Oct 17, 2017yup punting for so long on solving this problem properly (see also Standard ML's "eqtype" nonsense) is a big failing of the ML community11
Graydon Hoare@graydon_pub·Oct 17, 2017Replying to @brendanzab @neurocy and 2 othersInteresting. I really prefer the "module as set of operations & laws over types" stance when working. Don't mind naming instances at all.11
Graydon Hoare@graydon_pub·Oct 17, 2017But again, I'm the guy who thinks environment capture is too much magic to include as a feature :P14
Patrick Walton@pcwalton·Oct 18, 2017Replying to @brendanzab @graydon_pub and 3 othersMy feeling is that (pardon the cliché) typeclasses are the worst of all module systems, except for all the others.15
Graydon Hoare@graydon_pub·Oct 18, 2017Yeah I know. And in the grand scheme of things any response to Rust’s incredible success is a bit churlish of me. I just daydream sometimes.24