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
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 $debuggi
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
On 1/10/03 12:24 PM, Damian Conway wrote:
> "Immediate" subroutines are executed as soon as they are parsed (i.e. they're
> like named BEGIN blocks).
>
> Returning a closure/block from an immediate sub called in a void context
> (as C is in the example above) causes the immediate sub call to be
>
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 to use such a feature for debugging and
assert
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 #
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-l
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...)
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;
>>> }
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
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 attem
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 globa
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 guess
> 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,
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 to use such a feature for debugging and
assertions. What everyone wa
I appear to have been compromised. Am going off-line until I can track the
problem and beef up security.
--
Bryan C. Warnock
[EMAIL PROTECTED]
17 matches
Mail list logo