In a message dated Thu, 13 Mar 2003, Luke Palmer writes:
> {
> my Class %valClasses;
>
> sub Val($N) returns Class {
> my Class $rclass = %valClasses{$N} //= class {
> multi *isa ($obj, $rclass $class) { $obj ~~ $N }
> }
> }
> }
>
> multi fact
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
LW> On Sat, Mar 15, 2003 at 05:32:41PM -0800, mlazzaro wrote:
LW> : So my reading is that it's not possible to specify 'required'
LW> : named parameters, unless we're completely missing something. My
LW> : first impulse is that it's no
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
LW> It is likely that if we have "is static", the compiler would translate
LW> my $pi is static = 3
LW> to something like
LW> our $foo__Xdeadbeef will init {.set(3)}
LW> I really hate the word "static" though, which is why
Larry Wall wrote:
> On the other hand, "is static" would be instantly recognizable to
> C programmers. Maybe they're due for a sop...
Bah! No sop for them! C has so many overloaded meanings in
C/C++ that who's to say this meaning is really the one that's worth
codifying? (I always felt this pa
Luke Palmer wrote:
> The idea is that positional parameters are always a contiguous
> sequence in the argument list. If it looked like this:
>
> sub foo($x, ?$y, +$k, [EMAIL PROTECTED]) {...}
>
> Then one might presume to call it like:
>
> foo($x, $y, $k, 1, 2, 3);
>
> Which they ca
On Sat, Mar 15, 2003 at 08:05:03PM -0500, Joe Gottman wrote:
:
: - Original Message -
: From: "Dave Whipp" <[EMAIL PROTECTED]>
: To: <[EMAIL PROTECTED]>
: Sent: Saturday, March 15, 2003 1:35 PM
: Subject: Re: is static?
:
:
: > Uri Guttman wrote:
: > > talking about nested subs brought u
> > Doesn't C give you this?
>
> Not really. A variable declared with can be accessed from
> anywhere in the program, just by redeclaring it or calling it with
> the "package::" syntax.A variable declared with can be
> accessed outside its scope only if the user returns a reference
> to i
On Sat, Mar 15, 2003 at 05:32:41PM -0800, mlazzaro wrote:
: So my reading is that it's not possible to specify 'required' named parameters,
: unless we're completely missing something. My first impulse is that it's not a
: big deal, because who's gonna do that? My second impulse is... well... if
Nicholas Clark wrote:
> On Wed, Mar 12, 2003 at 12:18:33PM +1100, Damian Conway wrote:
> > The design team has already considered this idea, and my problem
> > with it then (and now) is that it's inconsistent with other forms
> > of variable declaration:
> >
> > my sub foo( ?$bar is consta
Uri Guttman wrote:
> > "NC" == Nicholas Clark <[EMAIL PROTECTED]> writes:
>
> NC> How come there seems to be no way to specify mandatory named
> NC> parameters? I'm not sure that *I*'d ever want to write
>
> apoc6:
> A hash declaration like *%named indicates that the %named hash
>
- Original Message -
From: "Dave Whipp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 15, 2003 1:35 PM
Subject: Re: is static?
> Uri Guttman wrote:
> > talking about nested subs brought up another related idea, static (not
> > on the stack) lexicals inside subs.
>
> D
> I'm not sure if it helps people understand why I'm confused by explaining
> my background, but I've done exactly zero computer science, and have come
> to whatever (mis)understanding of OO I have by using C++ (and then perl).
> I've never used Java, but I'm aware that it has a concept of "interfa
> "NC" == Nicholas Clark <[EMAIL PROTECTED]> writes:
NC> If I've understood A6 correctly there are 6 types of argument to
NC> subroutines: invocant, mandatory positional parameters, optional
NC> positional parameters, optional named parameters, slurpy hash and
NC> slurpy array.
NC>
There seems to be some confusion about which way up the world is.
On Tue, Mar 11, 2003 at 01:25:41PM +1100, Damian Conway wrote:
> Which in turn is because:
>
> not Scalar.isa(int)
On Thu, Mar 13, 2003 at 11:55:06AM -0800, Larry Wall wrote:
> On Thu, Mar 13, 2003 at 11:31:30AM -0800, Austi
If I've understood A6 correctly there are 6 types of argument to subroutines:
invocant, mandatory positional parameters, optional positional parameters,
optional named parameters, slurpy hash and slurpy array.
How come there seems to be no way to specify mandatory named parameters?
I'm not sure th
On 03/14/2003 3:22 PM, Dan Sugalski wrote:
There's a difference between "Fund project X" and "Fund person X".
Funding a project, and having one person suitable to do the project, is
OK, generally speaking. (Though I expect the feds still peer pretty
closely) Funding a specific person is dodgier.
At 8:16 AM -0800 3/15/03, Larry Wall wrote:
On Sat, Mar 15, 2003 at 11:27:03AM +, Nicholas Clark wrote:
: I think that it would be nice to be able to chain yourself in there, rather
: than having to replace.
:
: In perl5 there are some things you have to override, rather than adding to.
: Offha
On Sat, Mar 15, 2003 at 11:27:03AM +, Nicholas Clark wrote:
: I think that it would be nice to be able to chain yourself in there, rather
: than having to replace.
:
: In perl5 there are some things you have to override, rather than adding to.
: Offhand I can't see a practical way that the opc
Uri Guttman wrote:
talking about nested subs brought up another related idea, static (not
on the stack) lexicals inside subs.
Doesn't C give you this?
Dave.
--
http://dave.whipp.name
talking about nested subs brought up another related idea, static (not
on the stack) lexicals inside subs. the current solution in p5 is to
declare them in a surrounding block and that is slightly ugly. and if
you want multiple subs to share them they all have to be in that block.
so a simple is
> "LP" == Luke Palmer <[EMAIL PROTECTED]> writes:
>> on boston.pm a thread arose about having named subs inside subs. of
>> course perl5 can do it but they don't do anything useful but they do
>> have some odd implemenation defined closure behavior.
>>
>> someone brought up lisp and
On Thu, Mar 13, 2003 at 12:02:22AM +, Piers Cawley wrote:
> Damian Conway <[EMAIL PROTECTED]> writes:
> > We didn't include it in A6 but our current notions (i.e. this week ;-)
> > about interactions between subs, methods, and multimethods are
> > something like this:
> >
> >
On Wed, Mar 12, 2003 at 12:18:33PM +1100, Damian Conway wrote:
> Various folks have suggested that the default assignment syntax:
>
> sub foo(?$bar is copy = 1) {...}
>
> be considered merely a shorthand for something like:
>
> sub foo(?$bar is copy is default(1)) {...}
>
> thereby allo
23 matches
Mail list logo