Ceylon Migration Bot

Results 83 comments of Ceylon Migration Bot

[@gavinking] > Then the one thing I don't like is having the overridden implementation be a type. If it's a type, it can be used in all sorts of ways...

[@pthariensflame] @gavinking You're not "mixing together objects", you just happen to have more than one instance of a type, which you definitely _do_ already know how to deal with.

[@gavinking] > I though an introduction was an injection of a method into a type by a type class, which doesn't exist in Haskell (because methods don't exist, at least...

[@gavinking] > You're not "mixing together objects", you just happen to have more than one instance of a type, which you definitely do already know how to deal with. I...

[@pthariensflame] Then you want (roughly) what this Haskell code gives you: ``` haskell {-# LANGUAGE ConstraintKinds, KindSignatures #-} import Data.Constraint type DecidableMonoidalRing (a :: *) = ((Monoid a, Ring a,...

[@RossTate] @pthariensflame: Extension methods are purely syntactic sugar for calling top-level/static functions/methods. @gavinking: Okay, I think I see what you're doing. You're taking advantage of the fact that your `StringMonoid`...

[@pthariensflame] @RossTate Yes, but there's nothing stopping an extension method from delegating to a type class method on the metatype. For example: ``` ceylon public interface Monoid { Value zero;...

[@RossTate] Huh? You seem to be assuming a way to make a type's metaobject implement an interface, which is what we're trying to figure out here.

[@gavinking] Please keep in mind that I have the following ulterior goals here: - make it _very_ easy to implement this functionality in the JVM, layered over the top of...

[@pthariensflame] @RossTate So you just declare that that's what happens. You can take a (very minor) leaf from universe-polymorphic type theory here: The metatype of a type is simply a...