Re: Edge case: incongruent roles

2006-10-17 Thread Jonathan Lang
TSa wrote: Pinning the return type to Num is bad e.g. if you want multi targets like :(Complex,Complex-->Complex). Should that also numerify complex values when stored in a Num container? If yes, how? If at all possible, I would expect Complex to compose Num, thus letting a Complex be used anyw

Re: class interface of roles

2006-10-17 Thread Jonathan Lang
I think I found the core of the issue here; it has to do with the differences between roles and mixins, with an analogous difference between compile-time composition and runtime composition. Details follow. TSa wrote: Jonathan Lang wrote: > Just to make sure we're speaking the same language: by

Re: Edge case: incongruent roles

2006-10-17 Thread TSa
HaloO, TSa wrote: I know that the return type of / could be Num in "reality" but that spoils the example. Sorry if the above is a bad example. Pinning the return type to Num is bad e.g. if you want multi targets like :(Complex,Complex-->Complex). Should that also numerify complex values when s

Re: Edge case: incongruent roles

2006-10-17 Thread TSa
HaloO, Larry Wall wrote: On Fri, Oct 13, 2006 at 04:56:05PM -0700, Jonathan Lang wrote: : Trey Harris wrote: : >All three objects happen to be Baz's, yes. But the client code doesn't : >see them that way; the first snippet wants a Foo, the second wants a Bar. : >They should get what they expect

Re: class interface of roles

2006-10-17 Thread TSa
HaloO, Jonathan Lang wrote: Shouldn't the 'divert' be a trait of the method instead of a key/value pair on the class? I thought about doing it that way; but then the class wouldn't know to look for it when composing the role. I figure you see the class in a very active role when composing ro

Re: class interface of roles

2006-10-17 Thread TSa
HaloO, Jonathan Lang wrote: > TSa wrote: Note that I think the conflict detection of role methods prevents the composition of the equal method through the superclass interface. Just to make sure we're speaking the same language: by "superclass", you're referring to classes brought in via "is";

Re: class interface of roles

2006-10-17 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: > Of course, you then run into a problem if the class _doesn't_ redefine > method equal; if it doesn't, then what is GenPointMixin::equal > calling? This is the reason why there is a type bound on the class that should result in a composition error when the equal

Re: class interface of roles

2006-10-17 Thread TSa
HaloO Jonathan, you wrote: > Of course, you then run into a problem if the class _doesn't_ redefine > method equal; if it doesn't, then what is GenPointMixin::equal > calling? This is the reason why there is a type bound on the class that should result in a composition error when the equal metho

class interface of roles

2006-10-17 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: > TSa wrote: >> This is exactly what I don't want. Such an equal method needs to be >> written in each and every class the role GenPoint is composed into. > > No, it doesn't. It only needs to be written in those classes where > the 'equal' method is supposed to be

[ANNOUNCE] Pugs 6.2.13 released!

2006-10-17 Thread Audrey Tang
After nearly four months of development and 3400+ commits, I'm very glad to announce that Pugs 6.2.13 is now available: http://pugs.blogs.com/dist/Perl6-Pugs-6.2.13.tar.gz SIZE: 6839270 SHA1: b06b8434c64e9bb5e3ab482282fbae0a6ba69218 Motivated by increasing use of Pugs in production,