Re: [P6L] Closed Classes Polemic (was Re: What the heck is a submethod (good for))

2005-10-14 Thread chromatic
On Thu, 2005-10-13 at 18:36 -0700, Chip Salzenberg wrote: On Thu, Oct 13, 2005 at 06:13:09PM -0700, chromatic wrote: I just don't want people who merely write a module or class to be able to prevent people who actually use that module or class from using, extending, or poking around in

Re: Thoughs on Theory.pm

2005-10-14 Thread Luke Palmer
On 10/13/05, Dave Whipp [EMAIL PROTECTED] wrote: I started thinking about the in general, unverifiable programmatically bit. While obviously true, perhaps we can get closer than just leaving them as comments. It should be possible to associate a unit-test-generator with the theory, so I can

Re: Custom Metaclass and Inheritance of Class Methods

2005-10-14 Thread Rob Kinyon
== CONCLUSION / WRAP-UP So, now that I have sufficiently bored you all to tears, I will do a quick re-cap of the main question, and the possible solutions. Should metaclasses be inherited along normal class lines? Meaning that if Foo uses a custom metaclass, and Bar isa Foo, then Bar also

Should roles and classes be merged?

2005-10-14 Thread Rob Kinyon
In the discussions I've had with Steve, one thing that always nagged me - what's the difference between a class and a role? I couldn't fix it in my head why there were two separate concepts. Steve, yesterday, mentioned to me that in the metamodel that he's got so far, Class does Role. This

Translitteration and combining strings and array references

2005-10-14 Thread Peter Makholm
Yesterday I spend some hours getting pugs to understand translitterations with multiple ranges in each pair. E.g. foobar.trans( a-z = n-za-n ); By accident I tested something like: foobar.trans( ['a' .. 'z'] = n-za-m ); and it didn't work. The problem is that ['a' .. 'z'] gets

Re: Should roles and classes be merged?

2005-10-14 Thread Yuval Kogman
On Fri, Oct 14, 2005 at 09:08:45 -0400, Rob Kinyon wrote: couldn't fix it in my head why there were two separate concepts. The difference between a class and a role is in the eyes of their consumer - the way in which a class gets new behavior (inheritence, mixin, or role composition style) is

Re: Proposal to make class method non-inheritable

2005-10-14 Thread Piers Cawley
Stevan Little [EMAIL PROTECTED] writes: Piers, On Oct 12, 2005, at 5:22 AM, Piers Cawley wrote: We definitely have two instances of A since, B.isa(::A). We also have a fragile implementation of count. :) Sorry, I purposefully made it a kludge as that is usually the way the example is

Re: Should roles and classes be merged?

2005-10-14 Thread Larry Wall
On Fri, Oct 14, 2005 at 09:08:45AM -0400, Rob Kinyon wrote: : What this means is that classes and roles both quack, swim, and : lay eggs. They're both just ducks. Given that, there's no need for two : separate concepts in the implementation. It just makes for a more : complex implementation.

Re: Should roles and classes be merged?

2005-10-14 Thread Rob Kinyon
On 10/14/05, Larry Wall [EMAIL PROTECTED] wrote: : I need to stress that I'm not suggesting that the keyword role : be removed. It won't be the first time we have keywords that mean the : same thing, just with a little sugar added. It definitely improves : maintainability to have separate

Re: Translitteration and combining strings and array references

2005-10-14 Thread Larry Wall
On Fri, Oct 14, 2005 at 08:38:55AM +0200, Peter Makholm wrote: : Yesterday I spend some hours getting pugs to understand : translitterations with multiple ranges in each pair. E.g. : : foobar.trans( a-z = n-za-n ); : : By accident I tested something like: : : foobar.trans( ['a' .. 'z'] =

Re: Proposal to make class method non-inheritable

2005-10-14 Thread Stevan Little
Piers, On Oct 14, 2005, at 12:14 PM, Piers Cawley wrote: Stevan Little [EMAIL PROTECTED] writes: On Oct 12, 2005, at 5:22 AM, Piers Cawley wrote: We definitely have two instances of A since, B.isa(::A). We also have a fragile implementation of count. :) Sorry, I purposefully made it a

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-14 Thread Larry Wall
On Fri, Oct 14, 2005 at 01:43:39PM +1100, Stuart Cook wrote: : On 14/10/05, Stevan Little [EMAIL PROTECTED] wrote: : So anyway, here are a few ideas, in no particular order: : : method bark (::Dog $d:) { ... } : # not sure if this notation is already taken or not : : method bark

Lazy Generics side-bar (was Re: Should roles and classes be merged?)

2005-10-14 Thread Stevan Little
Larry, On Oct 14, 2005, at 1:28 PM, Larry Wall wrote: Generics are somewhat orthogonal to the mutable/immutable distinction, except that they're a better fit for roles because someone has to choose when to instantiate them, and they're easier to understand with early binding rather than late

Book RFC - Migrating to Perl 6

2005-10-14 Thread Yuval Kogman
I'd like to start by saying DON'T PANIC! I'm not going to write a book on Perl 6 ;-) Luckily we have people with much more enlish-fu, structured-thought-fu, and general get-it-done-fu... Now let's talk a bit about them: Today Geoff Broadwell raised a book idea for discussion on #perl6. The

Re: Translitteration and combining strings and array references

2005-10-14 Thread Peter Makholm
[EMAIL PROTECTED] (Larry Wall) writes: On Fri, Oct 14, 2005 at 08:38:55AM +0200, Peter Makholm wrote: : Yesterday I spend some hours getting pugs to understand : translitterations with multiple ranges in each pair. E.g. : : foobar.trans( a-z = n-za-n ); : : By accident I tested

Re: Translitteration and combining strings and array references

2005-10-14 Thread Juerd
Larry Wall skribis 2005-10-14 10:43 (-0700): Actually, it looks like the bug is probably that = is forcing stringification on its left argument too agressively. It should only do that for an identifier. Would it work to call this process autoquoting, instead of stringification? I'm assuming

Re: Translitteration and combining strings and array references

2005-10-14 Thread Larry Wall
On Fri, Oct 14, 2005 at 08:49:50PM +0200, Peter Makholm wrote: : The code I'm lookin at is in pugs/src/perl6/Prelude.pm around line 380: : : method trans (Str $self: *%intable) is primitive is safe { : : my sub expand (Str $string is copy) { : ... : } : :

Re: Translitteration and combining strings and array references

2005-10-14 Thread Larry Wall
On Sat, Oct 15, 2005 at 01:27:58AM +0200, Juerd wrote: : Larry Wall skribis 2005-10-14 10:43 (-0700): : Actually, it looks like the bug is probably that = is forcing : stringification on its left argument too agressively. It should only : do that for an identifier. : : Would it work to call

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-14 Thread Stevan Little
Larry, I have been giving a lot of thought to the way you have been describing classes lately. I think I understand where you are going with it, but I need to understand some of the details. On Oct 14, 2005, at 2:15 PM, Larry Wall wrote: This only reinforces my view that all the meta

Standard library for perl6? (graphical primitives)

2005-10-14 Thread Markus Laire
(I'm mainly interested about graphical primitives, but there are likely other areas where standard library would be of use.) If I want to write a crossplatform text-mode application, I could write it in perl, and know that it will be usable in wide variety of platforms, as long as I use only