On Sep 8, 2006, at 7:02 AM, skaller wrote:

> On Fri, 2006-09-08 at 00:20 -0400, Peter Tanski wrote:
>
>> On this point, I forgot to mention one thing.  Haskell type classes
>> are more powerful than ML modules or OCaml functors because type
>> classes may be defined over all first-class types, including
>> functions.  For example, the
>>
>> class Functor f where
>>      fun :: (a -> b) -> (f a -> f b)
>>
>> instance Functor (r->) where
>>      fun f g = f . g
>>
>
> Not sure I understand.

That's because I'm wrong :)

> Ocaml functors can accept any type of
> argument component, including functions: the argument
> isn't a type, its a module. Higher order functors exist too
> so I'm told: the only constraint is that functors aren't
> themselves first class because modules aren't.

Since type classes aren't first-class values you can pass around  
(they are just 'functional laws'), they aren't either but that  
shouldn't matter since you can freely intermix them, such as Monad  
Functors and such what.

-Pete

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to