Brent Dax writes:
: Larry Wall:
: # Note that the "sub" is standing in for &, so it'd have to be
: #
: # my Dog sub hot {...}
: #
: # or
: #
: # my Dog &hot {...}
:
: What about package subs?
:
: our Dog sub hot {...}
:
: seems just a bit verbose...
Seems to me that discouraging
Larry Wall:
# Note that the "sub" is standing in for &, so it'd have to be
#
# my Dog sub hot {...}
#
# or
#
# my Dog &hot {...}
What about package subs?
our Dog sub hot {...}
seems just a bit verbose...
--Brent Dax
[EMAIL PROTECTED]
Configure pumpking for Perl 6
When I take a
: Personally I suspect he may prefer to stick with "type-before-name":
:
: my Dog $spot;
:
: sub Dog hot {...}
Note that the "sub" is standing in for &, so it'd have to be
my Dog sub hot {...}
or
my Dog &hot {...}
To get a dollarless variant of Perl it may suffice to
Aaron wrote:
> > sub foo (@args) -> rettype
>
> Hmm... I would have expected "is" to come in here:
>
>sub foo (@args) is IO::Handle
It would have to be:
sub foo (@args) is type(IO::Handle)
or something, I think. Unless Larry decides that every class/module
name i
On Tue, Oct 30, 2001 at 03:59:30PM +1100, Damian Conway wrote:
> (Though I *do* harbour a secret desire to resurrect -> as a type specifier:
>
> sub foo (@args) -> rettype
Hmm... I would have expected "is" to come in here:
sub foo (@args) is IO::Handle
> my $bar -> int;
H
> For a typed subroutine with named parameters, is the declaration syntax
> (sans property declaration) going to be:
>
>'sub' type ident '(' paramlist ')' block
>
> (in, say, Parse::RecDescent)? I'm thinking about how to add subroutines
> to BabyPerl*, and I need to k
For a typed subroutine with named parameters, is the declaration syntax
(sans property declaration) going to be:
'sub' type ident '(' paramlist ')' block
(in, say, Parse::RecDescent)? I'm thinking about how to add subroutines
to BabyPerl*, and I need to know if I'm at least right about