Re: new mailing list: perl6-general?

2005-06-16 Thread BÁRTHÁZI András
Hi, I think, that David's version is matches with my opinion. I don't think, that beginners would be a better name for it, but maybe more practical, as it's a more evident name. Bye, Andras David Storrs wrote: On Jun 15, 2005, at 3:33 PM, Patrick R. Michaud wrote: And here they are...

Re: new mailing list: perl6-general?

2005-06-16 Thread Fagyal Csongor
Hi, Hi, I think, that David's version is matches with my opinion. I don't think, that beginners would be a better name for it, but maybe more practical, as it's a more evident name. Hmmm, I think beginner is a little negative. What about professional Perl5 programmers, who wish to learn

Re: new mailing list: perl6-general?

2005-06-16 Thread BÁRTHÁZI András
Hi, Fagyal Csongor wrote: I think, that David's version is matches with my opinion. I don't think, that beginners would be a better name for it, but maybe more practical, as it's a more evident name. Hmmm, I think beginner is a little negative. What about professional Perl5 programmers,

sub my_zip (...?) {}

2005-06-16 Thread Autrijus Tang
Currently in Pugs *zip has no signature -- it simply rewrites its arguments into the listfix (i.e. Y) function. That is bad because it can't be introspected, and you can't define something like that yourself. It also makes it uncompilable to Parrot as I don't control the runloop there. :)

Re: sub my_zip (...?) {}

2005-06-16 Thread Larry Wall
On Thu, Jun 16, 2005 at 05:40:31PM +0800, Autrijus Tang wrote: : Currently in Pugs *zip has no signature -- it simply rewrites its : arguments into the listfix (i.e. Y) function. : : That is bad because it can't be introspected, and you can't define : something like that yourself. It also makes

Ignoring parameters

2005-06-16 Thread Gaal Yahas
Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say Hello, FooClass!; } AFAIK, this is the only signature that would work for making greet a class method; but note that I'm not using $class, and I'd expect the compiler to

Re: sub my_zip (...?) {}

2005-06-16 Thread Gaal Yahas
[Sent off-group by mistake. On #perl6 the impression was that now Pipe is becoming a Role for things that can lazily be read from; and thus any filehandle or lazy list fulfills them. Larry, please help us understand if this is the case.] On Thu, Jun 16, 2005 at 08:53:41AM -0700, Larry Wall wrote:

Re: sub my_zip (...?) {}

2005-06-16 Thread Smylers
Larry Wall writes: This does imply that we can pipe into a subscript somehow. Why? Or rather, why is that desirable? If we choose something like () for our placeholder meaning pipe into this location, then @[EMAIL PROTECTED]; @b; @c] is the same as @foo[()] == @a == @b ==

Re: sub my_zip (...?) {}

2005-06-16 Thread Larry Wall
On Thu, Jun 16, 2005 at 07:24:42PM +0300, Gaal Yahas wrote: : [Sent off-group by mistake. On #perl6 the impression was that now Pipe : is becoming a Role for things that can lazily be read from; and thus any : filehandle or lazy list fulfills them. Larry, please help us understand : if this is the

Re: Ignoring parameters

2005-06-16 Thread Luke Palmer
On 6/16/05, Gaal Yahas [EMAIL PROTECTED] wrote: Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say Hello, FooClass!; } Aside from the fact that I don't think this is the right way to specify class methods... AFAIK,

scalar dereferencing.

2005-06-16 Thread Autrijus Tang
my $x = 3; my $y = \$x; say $y + 10; $y++; say $y; say $x; Currently in Pugs they print: 13 4 3 Is this sane? What is the scalar reference's semantics in face of a stringification and numification? I assume that array/hash references simply pass on to the

Re: Ignoring parameters

2005-06-16 Thread Gaal Yahas
On Thu, Jun 16, 2005 at 01:26:31PM -0600, Luke Palmer wrote: Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say Hello, FooClass!; } Aside from the fact that I don't think this is the right way to specify class

Re: sub my_zip (...?) {}

2005-06-16 Thread Dave Whipp
Larry Wall wrote: You must specify @foo[[;[EMAIL PROTECTED] or @foo[()] == @bar to get the special mark. I'm uncomfortable with the specific syntax of @a[()] because generated code might sometimes want to generate an empty list, and special-casing that sort of thing is always a pain (and

Re: Ignoring parameters

2005-06-16 Thread Damian Conway
Gaal Yahas wrote: On Thu, Jun 16, 2005 at 01:26:31PM -0600, Luke Palmer wrote: Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say Hello, FooClass!; } Aside from the fact that I don't think this is the right way to specify

Re: sub my_zip (...?) {}

2005-06-16 Thread Larry Wall
On Thu, Jun 16, 2005 at 01:05:22PM -0700, Dave Whipp wrote: : Larry Wall wrote: : You must : specify @foo[[;[EMAIL PROTECTED] or @foo[()] == @bar to get the special mark. : : I'm uncomfortable with the specific syntax of @a[()] because generated : code might sometimes want to generate an

Re: Ignoring parameters

2005-06-16 Thread John Siracusa
On 6/16/05, Damian Conway [EMAIL PROTECTED] wrote: And I think that subs and methods *should* complain about all unused non-optional parameters *except* invocants. This brings up something I've been thinking about. I sometimes write a method in Perl 5 that does something or other and then

Re: Ignoring parameters

2005-06-16 Thread Patrick R. Michaud
On Fri, Jun 17, 2005 at 07:05:11AM +1000, Damian Conway wrote: Gaal Yahas wrote: On Thu, Jun 16, 2005 at 01:26:31PM -0600, Luke Palmer wrote: Say I have a class method in FooClass, callable as FooClass.greet(): method greet(Class $class: ) { say Hello, FooClass!; } Aside

Re: Ignoring parameters

2005-06-16 Thread Damian Conway
Patrick wrote: Somehow I read these as though the original poster was correct -- i.e., one creates a class method for FooClass as either method greet(Class $class:) { say Hello!; } Yes. That will work, but it's not the recommended solution. or method greet(FooClass $class:) { say

nested subs

2005-06-16 Thread Piers Cawley
So, I was about to write the following test for Pugs: sub factorial (Int $n) { my sub factn (Int $acc, $i) { return $acc if $i $n; factn( $acc * $i, $i+1); } factn(1, 1); } When I thought to check the apocalypses and exegeses and, what do you know, I couldn't find

Re: nested subs

2005-06-16 Thread Luke Palmer
On 6/16/05, Piers Cawley [EMAIL PROTECTED] wrote: So, I was about to write the following test for Pugs: sub factorial (Int $n) { my sub factn (Int $acc, $i) { return $acc if $i $n; factn( $acc * $i, $i+1); } factn(1, 1); } When I thought to check the

Re: nested subs

2005-06-16 Thread Piers Cawley
Luke Palmer [EMAIL PROTECTED] writes: On 6/16/05, Piers Cawley [EMAIL PROTECTED] wrote: So, I was about to write the following test for Pugs: sub factorial (Int $n) { my sub factn (Int $acc, $i) { return $acc if $i $n; factn( $acc * $i, $i+1); } factn(1, 1);

Re: sub my_zip (...?) {}

2005-06-16 Thread Luke Palmer
On 6/16/05, Larry Wall [EMAIL PROTECTED] wrote: Or maybe a splat @foo[*] Or go with the parens with something in them to indicate the positive absence of something. @foo[(*)] Anyone else want to have a go at this bikeshed? You know, before I read this part of the message, I

When can I take given as read?

2005-06-16 Thread Piers Cawley
Suppose I have a simple, single argument recursive function: sub factorial (Int $n) { return 1 if $n == 0; return $n * factorial $n; } Can I write that as: sub factorial (Int $n:) { return 1 when 0; return $n * factorial $n; } NB. Yes, I know it's a pathological

Re: reduce metaoperator on an empty list

2005-06-16 Thread Edward Cherlin
On Thursday 09 June 2005 12:21, John Macdonald wrote: On Thu, Jun 09, 2005 at 06:41:55PM +0200, TSa (Thomas Sandla wrote: Edward Cherlin wrote: That means that we have to straighten out the functions that can return either a Boolean or an item of the argument type. Comparison functions