Re: [pugs]weird thing with say ++$

2005-04-25 Thread Steven Philip Schubiger
On 21 Apr, fayland wrote: : It has been published at perl6.language, but have no reply. That was to be expected, as it's no language-design specific issue, and therefore, unsuitable for p6l. : In perl v5.8.6 built for MSWin32-x86-multi-thread: : : my $i = 1; : print $i++, ++$i; # 1 3 : my $i

Re: [pugs]weird thing with say ++$

2005-04-25 Thread Juerd
Steven Philip Schubiger skribis 2005-04-25 5:41 (+0200): That was to be expected, as it's no language-design specific issue, and therefore, unsuitable for p6l. : print ++$i, $i++; # 3 2 You're misleaded here, by thinking, scalar context is being enforced, which is not the case; the results

Re: [pugs]weird thing with say ++$

2005-04-25 Thread Steven Philip Schubiger
On 25 Apr, Juerd wrote: : I don't know how it's called on other levels, but we're still calling : that list|slurpy|plural context. array context looks too much like : Array context, which is something else. I confess, it's likely a bad habit, to coin it array context on p6l, although it refers

Re: [pugs]weird thing with say ++$

2005-04-25 Thread Juerd
Steven Philip Schubiger skribis 2005-04-25 18:44 (+0200): I confess, it's likely a bad habit, to coin it array context on p6l, although it refers to Perl 5, where it I have seen it more than once - perhaps, overly abused too. That's old Perl5-ese. There was a big jargon change when people

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Paul Johnson
On Thu, Apr 21, 2005 at 04:32:41PM +0800, fayland wrote: It has been published at perl6.language, but have no reply. In perl v5.8.6 built for MSWin32-x86-multi-thread: my $i = 1; print $i++, ++$i; # 1 3 my $i = 1; print ++$i, $i++; # 3 2 in pugs: my $i = 1; say $i++, ++$i; # 1 3

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Johan Vromans
Paul Johnson [EMAIL PROTECTED] writes: I think I understand the implementation details leading to each behaviour, but rather than saying which was right, I think I'd be quite happy to see Perl6 copy (the ideas behind) C's rules regarding sequence points and undefined behaviour. I'm not so

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Nathan Gray
On Thu, Apr 21, 2005 at 11:45:27AM +0200, Paul Johnson wrote: On Thu, Apr 21, 2005 at 04:32:41PM +0800, fayland wrote: It has been published at perl6.language, but have no reply. In perl v5.8.6 built for MSWin32-x86-multi-thread: my $i = 1; print $i++, ++$i; # 1 3 my $i = 1;

Re: [pugs]weird thing with say ++$

2005-04-21 Thread Matthew Walton
On Thu, Apr 21, 2005 at 11:45:27AM +0200, Paul Johnson wrote: It certainly makes more sense to me that the answer would be 2 2. But however it ends up, so long as we know what the answer will be, we can utilize it effectively in our programs. The trick with this construct usually in C is