skaller wrote:
> """The other thing is that one may declare instances of FooBar.
>
> > instance FooBar Int where
> > foo x = x > 0
> > bar n x = replicate n x
>
> this expands to:
>
> > instance Foo Int where
> > foo x = x > 0
> >
> > instance Bar Int where
> > bar n x = replicate n x
> """
>
> You can't do this in Felix .. and it is *already
> annoying*.
This aspect of "already annoying" only gets worse when the hierarchy
gets bigger. The Haskell experience indicates that it is important to
get this right.
> In Felix you actually have to instantiate
> Foo, Bar AND FooBar (well you should have to!!):
>
If Foo and Bar are disjoint, and FooBar is defined as their disjoint
union, then I disagree, you should not have to. This should be treated
as user-friendly syntactic sugar.
> Felix ALSO supports an entirely different mechanism
> for composition which is very confusing to me!
>
> You can ALSO write:
>
> typeclass Ord[v with Eq[v] ] { ... }
>
> This is quite different to
>
> typeclass Ord[v] { inherit Eq[v]; }
>
This seems to mirror the two ways in Ocaml that one can pull in a
parameter in Functors (via instantiation or via an explicit include).
The difference between the two is that the second case re-exports all of
Eq as part of Ord, which the first case does not. Both can be useful.
Jacques
-------------------------------------------------------------------------
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