On Thu, 09 Jan 2003 21:12:07 -0500, John Siracusa
[EMAIL PROTECTED] wrote:
[...]
Hey, it adds up! Okay, maybe it doesn't...but still, Perl 6 Should Be Able
To Do This! :) And I'd also like inline constructs like:
ASSERT $foo 5 is_happy(blah);
macro debug ($code) is parsed
Damian Conway [EMAIL PROTECTED] writes:
John Siracusa asked:
Has there been any discussion of how to create code in Perl 6 that's there
under some conditions, but not there under others? I'm thinking of the
spiritual equivalent of #ifdef, only Perlish.
In Perl 5, there were many attempts
Damian Conway wrote:
sub debug is immediate is exported (@message) {
return $debugging ?? { print $*STDERR: @message; } :: {;}
}
Won't @message need lazy evaluation? How will Perl know to
delay interpolation until the result of the macro is called
at run time?
- Ken
Ken Fox wrote:
Won't @message need lazy evaluation? How will Perl know to
delay interpolation until the result of the macro is called
at run time?
Good point. It would also need to be slurped.
So that's:
sub debug is immediate is exported (*@message is lazy) {
return
On Thu, Jan 09, 2003 at 07:55:20PM -0500, John Siracusa wrote:
Has there been any discussion of how to create code in Perl 6 that's there
under some conditions, but not there under others? I'm thinking of the
spiritual equivalent of #ifdef, only Perlish.
In Perl 5, there were many attempts
On Thu, Jan 09, 2003 at 11:15:49PM -0500, John Siracusa wrote:
On 1/9/03 10:10 PM, Michael G Schwern wrote:
I would assume it to be a compiler hint via subroutine attribute.
sub debug ($msg) is off {
print STDERR $msg;
}
some this subroutine is a no-op if a flag is set
On 1/9/03 11:27 PM, Michael G Schwern wrote:
On Thu, Jan 09, 2003 at 11:15:49PM -0500, John Siracusa wrote:
On 1/9/03 10:10 PM, Michael G Schwern wrote:
I would assume it to be a compiler hint via subroutine attribute.
sub debug ($msg) is off {
print STDERR $msg;
}
some this
John Siracusa [EMAIL PROTECTED] wrote:
Well, er, don't we need to decide what the subroutine attribute is, so that
the compiler will know to honor it and make the code disappear? It
doesn't seem like a feature that can be added from userland after the fact
(but maybe I'm wrong...)
In Perl
On Thu, 09 Jan 2003 19:55:20 -0500
John Siracusa [EMAIL PROTECTED] wrote:
Has there been any discussion of how to create code in Perl 6 that's
there under some conditions, but not there under others? I'm thinking
of the spiritual equivalent of #ifdef, only Perlish.
If the perl6 command-line
On 1/10/03 11:11 AM, Dan Brook wrote:
On Thu, 09 Jan 2003 19:55:20 -0500
John Siracusa [EMAIL PROTECTED] wrote:
Has there been any discussion of how to create code in Perl 6 that's
there under some conditions, but not there under others? I'm thinking
of the spiritual equivalent of #ifdef,
Date: Thu, 09 Jan 2003 19:55:20 -0500
From: John Siracusa [EMAIL PROTECTED]
Has there been any discussion of how to create code in Perl 6 that's there
under some conditions, but not there under others? I'm thinking of the
spiritual equivalent of #ifdef, only Perlish.
In Perl 5, there
On 1/9/03 9:01 PM, Luke Palmer wrote:
Well, I just do:
sub debug {
print STDERR shift, \n if DEBUG;
}
And hopefully (I don't know P5 internals so well) that optimizes to a
no-op so there's not even a function call there.
I don't know P5 internals so well either, but I'm guessing
On 1/9/03 10:10 PM, Michael G Schwern wrote:
I would assume it to be a compiler hint via subroutine attribute.
sub debug ($msg) is off {
print STDERR $msg;
}
some this subroutine is a no-op if a flag is set attribute.
Hm, not quite as convenient as setting a package global
13 matches
Mail list logo