a correct
answer.
:
: So I wonder, If we can make $scalar lazy also. As array now is lazy by
default.
:
: Even if making scalar lazy might cause problem sometimes, Is it
: possible to add a property which is like
: my $var is lazy; to handle these situation?
In Perl 6 you make lazy
right thing.
: : we have to use other way or eval '$s' before print to get a correct
answer.
: :
: : So I wonder, If we can make $scalar lazy also. As array now is lazy by
default.
: :
: : Even if making scalar lazy might cause problem sometimes, Is it
: : possible to add a property which
On Tue, Aug 23, 2005 at 10:56:08 -0700, Larry Wall wrote:
We could probably extend is cached to attributes (and their implied
accessors) if lazy blocks aren't sufficient.
Hmm... With the whole distinction of foo as a value and foo() as a
application of the value, maybe we can sometimes assign
my( $s, $t ); $s = value t is $t; $t = xyz; print $s;
in perl 5, it will give a warning, and won't do right thing.
we have to use other way or eval '$s' before print to get a correct answer.
So I wonder, If we can make $scalar lazy also. As array now is lazy by default.
Even if making scalar
Hi,
Yiyi Hu wrote:
my( $s, $t ); $s = value t is $t; $t = xyz; print $s;
in perl 5, it will give a warning, and won't do right thing.
we have to use other way or eval '$s' before print to get a correct
answer.
So I wonder, If we can make $scalar lazy also. As array now is lazy by
default
On 8/22/05, Yiyi Hu [EMAIL PROTECTED] wrote:
my( $s, $t ); $s = value t is $t; $t = xyz; print $s;
I have an answer for you that is much more detailed than what you want
to hear. The short answer is yes.
This is possible to implement, provided you appropriately declare $t.
It all depends on
On Tue, Aug 23, 2005 at 04:09:29AM +0800, Yiyi Hu wrote:
: my( $s, $t ); $s = value t is $t; $t = xyz; print $s;
: in perl 5, it will give a warning, and won't do right thing.
: we have to use other way or eval '$s' before print to get a correct answer.
:
: So I wonder, If we can make $scalar
On Monday 22 August 2005 04:25 pm, Larry Wall wrote:
On Tue, Aug 23, 2005 at 04:09:29AM +0800, Yiyi Hu wrote:
[stuff]
: Even if making scalar lazy might cause problem sometimes, Is it
: possible to add a property which is like
: my $var is lazy; to handle these situation?
In Perl 6 you make