On 16 February 2015 at 02:49, Keean Schupke <[email protected]> wrote:
> I just wondered if the Implicit calculus: > > http://homepages.inf.ed.ac.uk/wadler/papers/implicits/implicits.pdf > > would make a good basis for implicits in BitC, it claims to solve a couple > of the issues with Haskell type classes. > Yaaay (: It's vaguely like what we currently have, which Shap calls instance resolution via lexical contour. It would be hard for me to list all the discussions where a few of us (Sandro? David Jeske?) have tried to lead the others toward accepting some variant of this. But here are a few, as I scroll through my bitc history: A solution for overlapping and colliding instances (July 2013) The Issues With Type Classes (April 2012) Instance coherence: the shape of a solution (April 2012) Instance restrictions (August 2011) Resolving type class instances (August 2010) sort/sortBy (April 2010) There are likely many more. For the most part I don't think people got it - it's a simple solution to what is actually a simple problem, and when I first realised this I couldn't understand why I'd never thought of it before, but it's more and more obvious the more dependently typed you get. My own preference has always been Agda's syntax for these, as implicit arguments are really a logical extension to the existing dependent pattern match. Idris' syntax (it just calls them Type Classes) is a bit more mainstream, but functionally equivalent. Scala's implicit syntax is just awful. I would recommend that anyone who does not agree that this is a solved problem sit down with one of the languages mentioned in that paper for a few hours and create some overlapping instances and use them. -- William Leslie Notice: Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
