Re: Required Named Parameters Strike Back - P6 Summary Clarification

2004-04-28 Thread John Siracusa
From the recent P6 Summary:
   Larry's response is a masterpiece of conciseness:
 
  Well, actually, we saved you last summer when we decided to make +
  mean that the parameter must be named.

Larry's response also didn't really address the issue, since parameters
marked with a + in the signature are optional, not required.

   Discussion continued after this of course, but it was mostly concerned
   with making sure things worked as expected.

The continuing discussion revealed why it is not possible to check for
required params at compile time (well, for methods, anyway), but I still
wanted a way to tell Perl 6 to do runtime checks for me in response to a
particular signature.

Damian suggested an is required trait for signatures:

   sub foo(+$a is required, +$b is required) { ... }

which I'm all for, even if it is only a runtime check, but I'm not sure if
this is just one of Damian's Crazy Ideas(tm) or if it'll actually end up as
a standard part of the Perl 6 language.

-John



Re: Required Named Parameters Strike Back - P6 Summary Clarification

2004-04-28 Thread Larry Wall
On Wed, Apr 28, 2004 at 02:16:00PM -0400, John Siracusa wrote:
: ...but I'm not sure if this is just one of Damian's Crazy Ideas(tm)
: or if it'll actually end up as a standard part of the Perl 6 language.

I've never considered the two to be mutually exclusive.  :-)

Larry


RE: Required Named Parameters Strike Back - P6 Summary Clarification

2004-04-28 Thread Austin Hastings
They're exclusive by definition.

Were it to become part of the language, it would be one of Damian's
Brilliant Ideas.

=Austin


 -Original Message-
 From: Larry Wall [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 28 April, 2004 03:01 PM
 To: Perl 6 Language
 Subject: Re: Required Named Parameters Strike Back - P6 Summary
 Clarification


 On Wed, Apr 28, 2004 at 02:16:00PM -0400, John Siracusa wrote:
 : ...but I'm not sure if this is just one of Damian's Crazy Ideas(tm)
 : or if it'll actually end up as a standard part of the Perl 6 language.

 I've never considered the two to be mutually exclusive.  :-)

 Larry



Re: Required Named Parameters Strike Back - P6 Summary Clarification

2004-04-28 Thread Larry Wall
On Wed, Apr 28, 2004 at 03:18:14PM -0400, Austin Hastings wrote:
: They're exclusive by definition.

I don't think so.  Merely disjunctional.

: Were it to become part of the language, it would be one of Damian's
: Brilliant Ideas.

Crazy and Brilliant are not mutually exclusive either.  There are
several interesting correlations between (in)sanity and brilliance,
but it's only at the extremes that you can make dogmatic assertions
about those correlations.  To me, a Crazy Idea(TM) is just an idea
we have not yet decided the Brilliance (or the lack thereof) of.

Larry