RE: Proposal to make class method non-inheritable

2005-10-12 Thread Gordon Henriksen
On Tue, Oct 11, 2005 at 06:10:41PM -0400, Stevan Little wrote: > I would like to propose that class methods do not get inherited along > normal class lines. You mean, make them *not methods?* Because it's not a method unless it has an invocant, as far as I'm concerned. (Method implies polymorph

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Piers Cawley
Stevan Little <[EMAIL PROTECTED]> writes: > Hello all. > > I would like to propose that class methods do not get inherited along > normal class lines. > > I think that inheriting class methods will, in many cases, not DWIM. > This is largely because your are inheriting behavior, and not state > (s

Re: multiline comments

2005-10-12 Thread Juerd
Alfie John skribis 2005-10-12 15:28 (+1000): > Does Perl6 support multiline comments? All incarnations of Perl have allowed us to begin multiple subsequent lines with the comment glyph '#'. I am sure Perl 6 will not break this tradition. Juerd -- http://convolution.nl/maak_juerd_blij.html http:

[PATCH] Trivial typo fixes

2005-10-12 Thread Nick Glencross
Guys, Nothing too much to this patch. A fix to a couple of typos ('unimplemented' and 'too') and a few paths in examples. Regards, Nick Index: src/pmc_freeze.c === --- src/pmc_freeze.c(revision 9465) +++ src/pmc_freeze.c(

Re: [PATCH] Trivial typo fixes

2005-10-12 Thread Will Coleda
Applied, except for the patch to examples/md5sum.pir - That changes the md5sum of the file, which then breaks t/examples/pir.t While I was testing parakeet to make sure this didn't break anything, I noticed that parakeet was broken. (using soon to be and already deprecated syntax). In fut

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
Gordon, On Oct 11, 2005, at 9:10 PM, Gordon Henriksen wrote: On Tue, Oct 11, 2005 at 06:10:41PM -0400, Stevan Little wrote: I would like to propose that class methods do not get inherited along normal class lines. You mean, make them *not methods?* Because it's not a method unless it has an i

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
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 shown in most tutorials about class methods.

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
Gordon, It just occurred to me that the system shown below could be re- written to do away with class methods entirely. class Host { my $.plugInClass; } role PlugIn { method initWithHost (Host $h:) { ... } } role FeatureA {} role FeatureB {} role FeatureC {} class AB { does Plug

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
Larry, On Oct 11, 2005, at 8:47 PM, Larry Wall wrote: On Tue, Oct 11, 2005 at 06:10:41PM -0400, Stevan Little wrote: : Hello all. : : I would like to propose that class methods do not get inherited along : normal class lines. I think most class methods should be written as submethods instead

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
Gordon, On Oct 12, 2005, at 10:48 AM, Gordon Henriksen wrote: Actually, I wondered why you didn't suggest this earlier. :) I figured you were a step ahead of me: What if I want more than a boolean out of my class method? Then you put the class methods back in :) But then your Objective-C i

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
Gordon, On Oct 12, 2005, at 11:04 AM, Gordon Henriksen wrote: On Oct 12, 2005, at 09:41, Stevan Little wrote: If you use the BUILD submethod, then you never need to worry about a that, everything is initialized for you by BUILDALL. Now, if you want to have a constructor which accepts positi

Re: Sane (less insane) pair semantics

2005-10-12 Thread TSa
HaloO, Ingo Blechschmidt wrote: Exactly. I'd like to add that, under the proposal, you always know what things are passed how, only by looking for a "*". foo $var;# always positionally, even if $var isa Pair foo *$pair; # always named But where is the name? Is it 'pair'? Like in

Re: Roles and Trust

2005-10-12 Thread Ovid
--- Piers Cawley <[EMAIL PROTECTED]> wrote: > > How about: > > my method SCALAR::attributes($self:) { $$self } > my method HASH::attributes(%self:) { %self.kv } > my method ARRAY::attributes(@self:) { [EMAIL PROTECTED] } > > method _attributes($attrs) { > my @attributes = $attrs.attr

Re: Sane (less insane) pair semantics

2005-10-12 Thread Ingo Blechschmidt
Hi, TSa wrote: > Ingo Blechschmidt wrote: >> Exactly. I'd like to add that, under the proposal, you always know >> what things are passed how, only by looking for a "*". >> >> foo $var;# always positionally, even if $var isa Pair >> foo *$pair; # always named > > But where is the na

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Gordon Henriksen
On Oct 12, 2005, at 09:41, Stevan Little wrote: If you use the BUILD submethod, then you never need to worry about a that, everything is initialized for you by BUILDALL. Now, if you want to have a constructor which accepts positional arguments rather than named pairs (as the default does),

Re: Proposal to make class method non-inheritable

2005-10-12 Thread chromatic
On Wed, 2005-10-12 at 12:00 -0400, Stevan Little wrote: > Usefulness aside, why do Roles and Classes need to be seperate > beasts? In the current meta-model prototype, the role system is laid > atop the class system so that the following is true: > > Class is an instance of Class > Role is an

What the heck is a submethod (good for)

2005-10-12 Thread Luke Palmer
Okay, I seriously have to see an example of a submethod in use. BUILD etc. don't count. Why? Because: class Foo { method BUILD () { say "foo" } } class Bar is Foo { submethod BUILD () { say "bar" } } class Baz is Bar { } Foo.new; # foo Bar.new; #

cpan testers and dependencies

2005-10-12 Thread Fergal Daly
http://www.nntp.perl.org/group/perl.cpan.testers/257538 shows a fail for Test-Benchmark but the fail seems to be caused by CPANPLUS not installing dependencies: --- [MSG] [Sun Oct 9 02:42:22 2005] Module 'Test::Benchmark' requires 'Test::Tester' version '0.103' to be installed ... PREREQUISI

Re: cpan testers and dependencies

2005-10-12 Thread David Landgren
Fergal Daly wrote: http://www.nntp.perl.org/group/perl.cpan.testers/257538 shows a fail for Test-Benchmark but the fail seems to be caused by CPANPLUS not installing dependencies: Apparently it's a bug in CPANPLUS that stops it from keeping track of grand children dependencies. @INC winds up

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Gordon Henriksen
Actually, I wondered why you didn't suggest this earlier. :) I figured you were a step ahead of me: What if I want more than a boolean out of my class method? On Oct 12, 2005, at 10:27, Stevan Little wrote: Gordon, It just occurred to me that the system shown below could be re- written to

Re: What the heck is a submethod (good for)

2005-10-12 Thread Damian Conway
Luke wrote: Okay, I seriously have to see an example of a submethod in use. class Driver::Qualified { method drive { print "Brrrm brrrm!" } } class Driver::Disqualified is Driver { submethod drive { die .name(), " not allowed to driv

Re: What the heck is a submethod (good for)

2005-10-12 Thread Yuval Kogman
On Thu, Oct 13, 2005 at 05:42:31 +1000, Damian Conway wrote: > Luke wrote: > > >Okay, I seriously have to see an example of a submethod in use. > > class Driver::Qualified { > method drive { > print "Brrrm brrrm!" > } > } > > class Driver::Disqualifi

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

2005-10-12 Thread chromatic
On Wed, 2005-10-12 at 21:50 +0200, Yuval Kogman wrote: > This has even more implications with closed classes to which you > don't have source level access, and if this can happen it will > happen - i'm pretty sure that some commercial database vendors would > release closed source DBDs, for exampl

Complex types

2005-10-12 Thread Sam Vilain
Hi all, Is it intentional that S09 lists unboxed complex types, but equivalent Boxed types are missing from the "Types" section in S06? Sam.

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

2005-10-12 Thread Rob Kinyon
On 10/12/05, chromatic <[EMAIL PROTECTED]> wrote: > On Wed, 2005-10-12 at 21:50 +0200, Yuval Kogman wrote: > > > This has even more implications with closed classes to which you > > don't have source level access, and if this can happen it will > > happen - i'm pretty sure that some commercial data

Re: Complex types

2005-10-12 Thread Autrijus Tang
Larry Wall wrote: On Thu, Oct 13, 2005 at 09:43:15AM +1300, Sam Vilain wrote: : Hi all, : : Is it intentional that S09 lists unboxed complex types, but equivalent : Boxed types are missing from the "Types" section in S06? Nope. As it's a trivial omission, I went ahead and changed S06.pod (r6

Re: Complex types

2005-10-12 Thread Larry Wall
On Thu, Oct 13, 2005 at 09:43:15AM +1300, Sam Vilain wrote: : Hi all, : : Is it intentional that S09 lists unboxed complex types, but equivalent : Boxed types are missing from the "Types" section in S06? Nope. Larry

Re: [svn:parrot] r9470 - trunk/examples/pir

2005-10-12 Thread Will Coleda
CokeZero:~/research/parrot wcoleda$ prove -Ilib t/examples/pir.t t/examples/pirok 2/3 # Failed test (t/examples/pir.t at line 129) # got: '0141db367bd8265f37926c16ccf5113a examples/pir/ md5sum.pir # ' # expected: '3c97cb808c62b1b1a6ad9477d6edb850 examples/pir/ m

Re: [PATCH] Trivial typo fixes

2005-10-12 Thread Bernhard Schmalhofer
Will Coleda schrieb: Applied, except for the patch to examples/md5sum.pir - That changes the md5sum of the file, which then breaks t/examples/pir.t Thanks for looking at the examples. The md5sum.pir changes are now also in. Late at night I though that using the md5sum of md5sum.pir for testi

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

2005-10-12 Thread Luke Palmer
On 10/12/05, Rob Kinyon <[EMAIL PROTECTED]> wrote: > Plus, I can't imagine that a reverser for Parrot code is going to be that > hard to > write. Disassembling register machine code is significantly more difficult than disassembling stack machine code. That said, if the level of introspective ca

Re: multiline comments

2005-10-12 Thread Alfie John
It was just kind of a pain because you had to put a "=cut" after the "=end", and because you had to put paragraph spaces between everything. We're getting rid of both of those restrictions. Excellent! That's what was really bugging me. I'm really glad that is changing :) Thanks, Alfie

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Brent 'Dax' Royal-Gordon
Stevan Little <[EMAIL PROTECTED]> wrote: > I would like to propose that class methods do not get inherited along > normal class lines. I think you're not thinking about many major usage cases for class methods. For one example, look at my Cipher suite. (It's in Pugs's ext/Cipher directory.) The

Deprecated: Sub.get_name_space

2005-10-12 Thread Matt Diephouse
As of r9465, namespace is one word, not two. This reflects how it is commonly spelled. The Sub PMC method "get_name_space" has been deprecated in favor of "get_namespace" as a result of the change. -- matt diephouse http://matt.diephouse.com

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Rob Kinyon
All - I'm partly to blame for this thread because I put the idea into Steve's head that class methods being inheritable may be dogma and not a useful thing. Mea culpa. That said, I want to put forward a possible reason why you would want class methods to be inheritable - to provide pure f

Re: Checklist for resolving a [PATCH] bug

2005-10-12 Thread Joshua Hoblitt
It looks like the CREDITS file hasn't been getting updated. I'd like to revise that check-list to: - add the patch author to CREDITS or update the authors entry in CREDITS - add correspondence to the bug stating that the patch was applied AND the svn revision number. - make sure that the bugs '

Re: cpan testers and dependencies

2005-10-12 Thread James E Keenan
David Landgren wrote: Fergal Daly wrote: http://www.nntp.perl.org/group/perl.cpan.testers/257538 shows a fail for Test-Benchmark but the fail seems to be caused by CPANPLUS not installing dependencies: Apparently it's a bug in CPANPLUS that stops it from keeping track of grand children dep

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Stevan Little
Brent, On Oct 11, 2005, at 8:17 PM, Brent 'Dax' Royal-Gordon wrote: Stevan Little <[EMAIL PROTECTED]> wrote: I would like to propose that class methods do not get inherited along normal class lines. I think you're not thinking about many major usage cases for class methods. Actually I h

Re: Roles and Trust

2005-10-12 Thread Piers Cawley
Ovid <[EMAIL PROTECTED]> writes: > --- Piers Cawley <[EMAIL PROTECTED]> wrote: >> >> How about: >> >> my method SCALAR::attributes($self:) { $$self } >> my method HASH::attributes(%self:) { %self.kv } >> my method ARRAY::attributes(@self:) { [EMAIL PROTECTED] } >> >> method _attributes(