Re: The Use and Abuse of Liskov (was: Type::Class::Haskell does Role)

2005-07-19 Thread Luke Palmer
On 7/17/05, Damian Conway [EMAIL PROTECTED] wrote: You keep using that word. I do not think it means what you think it means -- Inigo Montoya Quite. I abused Liskov's name greatly here. Sorry about that. Anyway, my argument is founded on another

Re: DBI v2 - The Plan and How You Can Help

2005-07-19 Thread Kiran Kumar
We could have an option to do Bulk Inserts ..

Re: MML dispatch

2005-07-19 Thread TSa (Thomas Sandlaß)
HaloO Larry, you wrote: Implicit is that role distance is N + the distance to the nearest class that incorporates that role for small values of N. If class Dog does role Bark and also does role Wag, then passing a Dog to multi (Bark $x) multi (Wag $x) should result in ambiguity. The

How do subroutines check types?

2005-07-19 Thread Ingo Blechschmidt
Hi, class Foo {...} Foo.new.isa(Foo); # true Foo.isa(Foo); # true (see [1]) Foo.does(Class);# true sub blarb (Foo $foo, $arg) { ...; # Do something with instance $foo } blarb Foo.new(...), ...; # No problem blarb Foo,

Re: How do subroutines check types?

2005-07-19 Thread TSa (Thomas Sandlaß)
Ingo Blechschmidt wrote: How do I have to annotate the type specification in the declaration of the subroutine to not include the class Foo, but only allow instances of Foo? My understanding is that Foo.does(Foo) is false and sub params are checked with .does(). This automatically excludes

Re: More on Roles, .does(), and .isa() (was Re: Quick OO .isa question)

2005-07-19 Thread TSa (Thomas Sandlaß)
HaloO chromatic, you wrote: Have I mentioned before that I think you should be able to say: class Foo { method foo { ... } method more_foo { ... } } class Bar does Foo { method foo { ... } } ... probably get a compile-time error that Bar doesn't support more_foo()?

Referring to package variables in the default namespace in p6

2005-07-19 Thread Matthew Hodgson
Hi all, I've spent some of the afternoon wading through A12 and S10 trying to thoroughly understand scope in perl 6, in light of the death of use vars and the addition of class (as well as package module) namespaces. In the process I came up against some confusion concerning how the default

Re: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-19 Thread Larry Wall
On Tue, Jul 19, 2005 at 02:21:44PM +1200, Sam Vilain wrote: : Larry Wall wrote: : Users of the class includes people subclassing the class, so to them : they need to be able to use $.month_0 and $.month, even though there : is no has $.month_0 declared in the Class implementation, only :

Re: How do I... create a value type?

2005-07-19 Thread Nicholas Clark
On Mon, Jul 11, 2005 at 12:30:03PM -0700, Larry Wall wrote: Or we go the other way and, in a binge of orthogonality, rationalize all the on write traits: Current Conjectural === === is constant is dow die on write is copy is cow copy on write

Re: Referring to package variables in the default namespace in p6

2005-07-19 Thread Larry Wall
On Tue, Jul 19, 2005 at 07:25:35PM +0100, Matthew Hodgson wrote: : Hi all, : : I've spent some of the afternoon wading through A12 and S10 trying to : thoroughly understand scope in perl 6, in light of the death of use vars : and the addition of class (as well as package module) namespaces. :

Re: The Use and Abuse of Liskov

2005-07-19 Thread Damian Conway
Luke wrote: In absence of other information, a derived class behaves just like its parent. I can argue that one into the ground, but it is a postulate and doesn't fall out of anything deeper (in my thinking paradigm, I suppose). My best argument is that, how can you expect to add to

Re: Referring to package variables in the default namespace in p6

2005-07-19 Thread Matthew Hodgson
On Tue, 19 Jul 2005, Larry Wall wrote: On Tue, Jul 19, 2005 at 07:25:35PM +0100, Matthew Hodgson wrote: : : So the question is: what is the correct syntax for referring to package : variables in the default namespace? The * looks like a twigil but it isn't really. It's short for *::, where