[ From p6i ]
Patrick R. Michaud writes:
> On Fri, Dec 10, 2004 at 08:50:46PM +0100, Leopold Toetsch wrote:
> > Not quite. It gives one value if one is true or 0 (false). This is more
> > information then the perl5 implementation returns. The returned value (if
> > any) is still true but usable, if
Dave Whipp wrote:
Attributes are declared with C, but also have a unique signil
C<$.>. So is it strictly necessary to declare them? Or rather, is it
Cly necessary -- i.e. is the following legal?
no strict;
class Foo {
method bar {
say $.a++
}
}
For the standard layout, I'd think it'd be g
On Thu, Dec 09, 2004 at 11:18:34AM -0800, Larry Wall wrote:
> On Wed, Dec 08, 2004 at 08:24:20PM -0800, Ashley Winters wrote:
> : I'm still going to prefer using :=, simply as a good programming
> : practice. My mind sees a big difference between building a parse-tree
> : object and just grepping f
Attributes are declared with C, but also have a unique signil
C<$.>. So is it strictly necessary to declare them? Or rather, is it
Cly necessary -- i.e. is the following legal?
no strict;
class Foo {
method bar {
say $.a++
}
}
Consider a class (e.g., the hypothetical Geometry::Triangle) that can
have several attributes (side1, side2, side3, angle1, ang_bisector1,
side_bisector, altitude1 and so forth), most of which will not be
needed for most instances of Geometry::Triangle.
I know how this can be done in P5. Using
Michele Dondi writes:
> On Mon, 6 Dec 2004, Larry Wall wrote:
>
> >to return an infinite list, or even
> >
> > return 0..., 0...;
> >
> >to return a surreal list. Either of those may be bound to an array
>
> Hope not to bark something utterly stupid, but... if one iterates over
> such a list,
On Sat, 4 Dec 2004 22:03:19 -0800, Larry Wall <[EMAIL PROTECTED]> wrote:
On Sun, Dec 05, 2004 at 02:15:51AM +0300, Alexey Trofimenko wrote:
: oh! that it. I've found example which could make it clear to me
:
: sub test {
: return sub {
: for 1..3 {
:state $var = 1;
:print $var
Michele Dondi wrote:
On Sun, 5 Dec 2004, Matthew Walton wrote:
At least we had the sense to call them subroutines instead of functions.
Of course, that also upset the mathematicians, who wanted to call them
functions anyway. Go figure.
That might be because the mathematicians haven't heard of a v
On Mon, 6 Dec 2004, Larry Wall wrote:
to return an infinite list, or even
return 0..., 0...;
to return a surreal list. Either of those may be bound to an array
Hope not to bark something utterly stupid, but... if one iterates over
such a list, may it be that on the first C one really starts ov
On Mon, 6 Dec 2004, Luke Palmer wrote:
Well, there's always "domain" and "range", if we want to be
mathematical.
[snip]
What you want here is "domain" and "codomain". Which leads me to
believe that you don't want either.
For the record, in most connections "range" would be just as good. Indeed
"
On Sun, 5 Dec 2004, Matthew Walton wrote:
At least we had the sense to call them subroutines instead of functions.
Of course, that also upset the mathematicians, who wanted to call them
functions anyway. Go figure.
That might be because the mathematicians haven't heard of a variant of a
function
On Fri, 3 Dec 2004, Brent 'Dax' Royal-Gordon wrote:
Larry Wall <[EMAIL PROTECTED]> wrote:
So optimizing to a state variable won't necessarily help your loop
overhead, but it could help your subroutine overhead, at least in Perl
5, if Perl 5 had state variables. Best you can do in Perl 5 is an
"our
On Fri, 3 Dec 2004, Larry Wall wrote:
On Fri, Dec 03, 2004 at 06:43:05PM +, Herbert Snorrason wrote:
: This whole issue kind of makes me go 'ugh'. One of the things I like
: best about Perl is the amazing simplicity of the <> input construct.
Hmm.
while (<>) {...}
for .lines {...}
Looks l
On Fri, 3 Dec 2004, Larry Wall wrote:
On Sat, Dec 04, 2004 at 01:11:30AM +0100, Juerd wrote:
: What happens to the flip flop operator? Will .. in scalar context remain
: the same?
I don't think so. It's definitely a candidate for a longer
Huffmanization simply in terms of frequency of use. On top
14 matches
Mail list logo